There is a great coupon for borg and attic users. Which reduces the price to $0.03/GB/Month but without the same level of support the give normally.
To run a command on rsync.net we need to use
ssh -t as we are not given an interactive session. We can put the commands we want to run at the end of the ssh command.
ssh -t borg-server pwd so we can find what full path looks like.
It should look something like
/data1/home/1234 remember this.
Next we want a new folder for the borg repo, I’m going to call it
ssh -t borg-server "mkdir borg-repo; chmod 700 borg-repo"
The next command creates the repository and should be run on your machine not the server.
borg init -–encryption=repokey borg-server:borg-repo
Now for the optional part:
Create a file
temp.authorized_keys on your computer with the contents
We’ll need that path you remembered from above. eg. /data1/home/1234
command="cd /data1/home/1234/borg-repo; /usr/local/bin/borg1 serve --restrict-to-path /data1/home/1234/borg-repo",no-port-forwarding,no-X11-forwarding,no-pty,no-agent-forwarding,no-user-rc ssh-rsa AAAAAAAAYOURKEYAAAAA== firstname.lastname@example.org
N.B. borg1 uses the lastest version of borg, just using borg uses a very old version.
ssh-rsa AAAAAAAAYOURKEYAAAAA== email@example.com to your ssh public key.
Add any other keys you want to this file and then transfer using
scp temp.authorized_keys borg-repo:.ssh/authorized_keys fix up permissions with
ssh -t borg-server "chmod 700 .ssh; chmod 600 ssh/authorized_keys".
Now when you login using the private key it’ll be limited to the directory we just setup.
From the docs:
Due to the
cd command we use, the server automatically changes the current working directory. Then client doesn’t need to have knowledge of the absolute or relative remote repository path and can directly access the repositories at
I couldn’t make total sense what the above me and however I tried this command and it worked fine:
borg init --encryption=repokey borg-server:borg-repo/ to create your new repo.
Do it from your client
You can use commands like
borg create to add archives to the repo:
borg create -v --stats -p --compression=none borg-server:borg-repo/::-date +%Y-%m-%d