Name | borgssh JSON |
Version |
0.4.21
JSON |
| download |
home_page | https://gitlab.com/jaromrax/sshborg |
Summary | A package to simplify the borgbackup use with a borg server |
upload_time | 2023-01-06 08:56:10 |
maintainer | |
docs_url | None |
author | me |
requires_python | |
license | GPL2 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Project borgssh
This package simplifies the **borgbackup** use with a ssh server
on a (remote) computer.
## Usage
```
NAME
sshborg
SYNOPSIS
sshborg COMMAND
COMMANDS
COMMAND is one of the following:
list
FIRST of the global commands: borg list ssh://borg@***:2222/config/borg
create_and_prune_defaults
SECOND of the global commands, use: sshborg create_and_prune_defaults --configfile ~/.borgssh.conf
check
borg check --info ssh://borg@***:2222/config/borg borg info ssh://borg@***:2222/config/borg
create
borg create ssh://borg@***:2222/config/borg::host_folder
extract
borg extract --dry-run --list ssh://borg@***:2222/config/borg::host_folder_***
```
## Remarks
- port 2222 is hardcoded
- username borg is hardcoded
- prune is hardcoded (7 days, some weeks (8?), every month)
## Configuration
The config is in `~/.borgssh.conf` by default, but can be in another file
and sshborg is run with `-c configfile` option.
The example of the config:
```
{
"config": "~/.borgssh.conf",
"remote": "192.168.0.200",
"default_folders": [
"~/x_Lectures",
"~/x_DATA_ANALYSIS"
],
"quit": false
}
```
## Server
In general, it is ok to use a prepared docker with ssh server:
```
docker run -d --name=openssh-server --hostname=openssh-server -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e SUDO_ACCESS=true -e PASSWORD_ACCESS=true -e USER_PASSWORD=mysecretpassword -e USER_NAME=borg -p 2222:2222 -v /media/raiddisks:/config --restart unless-stopped ghcr.io/linuxserver/openssh-server
```
and install borgbackup inside.
```
ssh borg@127.0.0.1 -p 2222
sudo borg
apk update && apk add borgbackup --upgrade
```
then
- commit the docker with a new name like `openssh-server-borg`, setup
the `authorized_keys` to restrict ssh
```
command="/usr/bin/borg serve --restrict-to-path /config/borg" ssh-rsa AAAAB @giga
```
and the final docker can be run...
```
docker run -d --name=openssh-server-borg --hostname=openssh-server-borg -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e SUDO_ACCESS=false -e PASSWORD_ACCESS=false -e USER_PASSWORD=mysecretpassword -e USER_NAME=borg -p 2222:2222 -v /mnt/raiddisks/borgssh:/config --restart unless-stopped openssh-server-borg
```
Borgbackup must be probably init-ed like: `borg init ssh://borg@127.0.0.1:2222/config/borg -e none`
## gitlab:
https://gitlab.com/jaromrax/sshborg
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/jaromrax/sshborg",
"name": "borgssh",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "me",
"author_email": "mail@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/36/44/56cc59b3485f68697e736eca5b9686b77ee565620e3f676e4da605c4f415/borgssh-0.4.21.tar.gz",
"platform": null,
"description": "# Project borgssh\n\nThis package simplifies the **borgbackup** use with a ssh server\non a (remote) computer.\n\n## Usage\n\n```\nNAME\n sshborg\n\nSYNOPSIS\n sshborg COMMAND\n\nCOMMANDS\n COMMAND is one of the following:\n\n list\n FIRST of the global commands: borg list ssh://borg@***:2222/config/borg\n\n create_and_prune_defaults\n SECOND of the global commands, use: sshborg create_and_prune_defaults --configfile ~/.borgssh.conf\n\n check\n borg check --info ssh://borg@***:2222/config/borg borg info ssh://borg@***:2222/config/borg\n\n create\n borg create ssh://borg@***:2222/config/borg::host_folder\n\n extract\n borg extract --dry-run --list ssh://borg@***:2222/config/borg::host_folder_***\n```\n\n## Remarks\n - port 2222 is hardcoded\n - username borg is hardcoded\n - prune is hardcoded (7 days, some weeks (8?), every month)\n\n## Configuration\n\n The config is in `~/.borgssh.conf` by default, but can be in another file\n and sshborg is run with `-c configfile` option.\n\n The example of the config:\n ```\n {\n \"config\": \"~/.borgssh.conf\",\n \"remote\": \"192.168.0.200\",\n \"default_folders\": [\n \"~/x_Lectures\",\n \"~/x_DATA_ANALYSIS\"\n ],\n \"quit\": false\n}\n```\n\n## Server\n\nIn general, it is ok to use a prepared docker with ssh server:\n\n```\ndocker run -d --name=openssh-server --hostname=openssh-server -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e SUDO_ACCESS=true -e PASSWORD_ACCESS=true -e USER_PASSWORD=mysecretpassword -e USER_NAME=borg -p 2222:2222 -v /media/raiddisks:/config --restart unless-stopped ghcr.io/linuxserver/openssh-server\n```\n\nand install borgbackup inside.\n```\nssh borg@127.0.0.1 -p 2222\nsudo borg\napk update && apk add borgbackup --upgrade\n```\n\nthen\n - commit the docker with a new name like `openssh-server-borg`, setup\nthe `authorized_keys` to restrict ssh\n\n```\ncommand=\"/usr/bin/borg serve --restrict-to-path /config/borg\" ssh-rsa AAAAB @giga\n```\n\nand the final docker can be run...\n\n```\ndocker run -d --name=openssh-server-borg --hostname=openssh-server-borg -e PUID=1000 -e PGID=1000 -e TZ=Europe/London -e SUDO_ACCESS=false -e PASSWORD_ACCESS=false -e USER_PASSWORD=mysecretpassword -e USER_NAME=borg -p 2222:2222 -v /mnt/raiddisks/borgssh:/config --restart unless-stopped openssh-server-borg\n```\n\nBorgbackup must be probably init-ed like: `borg init ssh://borg@127.0.0.1:2222/config/borg -e none`\n\n\n## gitlab:\n\nhttps://gitlab.com/jaromrax/sshborg",
"bugtrack_url": null,
"license": "GPL2",
"summary": "A package to simplify the borgbackup use with a borg server",
"version": "0.4.21",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "364456cc59b3485f68697e736eca5b9686b77ee565620e3f676e4da605c4f415",
"md5": "230931e21cb48a3144e25d31f445b9fb",
"sha256": "597ef1c5626f1f62b41aae6eab0e8d63b23b3e7752c3fca596c62327b168359b"
},
"downloads": -1,
"filename": "borgssh-0.4.21.tar.gz",
"has_sig": false,
"md5_digest": "230931e21cb48a3144e25d31f445b9fb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8533,
"upload_time": "2023-01-06T08:56:10",
"upload_time_iso_8601": "2023-01-06T08:56:10.038776Z",
"url": "https://files.pythonhosted.org/packages/36/44/56cc59b3485f68697e736eca5b9686b77ee565620e3f676e4da605c4f415/borgssh-0.4.21.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-06 08:56:10",
"github": false,
"gitlab": true,
"bitbucket": false,
"gitlab_user": "jaromrax",
"gitlab_project": "sshborg",
"lcname": "borgssh"
}