Borg Backup
I recently replaced Time Machine with Borg on a Mac and these are the main steps to make it work.
The backup is on a server reached with ssh (and this is also the main reason for the switch, since Time Machine does not seem to work anymore with ssh; at least it stopped working on my machine).
Instructions
- Download borg or a borg GUI, such as Vorta
- Setup an ssh key to connect to the remote host with
ssh_keygen
Specify which key borg is going to use to remote server, for instance by adding a host configuration to
.ssh/config
$ cat ~/.ssh/config Host borg HostName borg.backup.server User username IdentityFile /User/username/.ssh/id_rsa IdentitiesOnly yes
or, alternatively, by setting
BORG_RSH
tossh -i /User/username/.ssh/id_rsa
, if you use the command line version.- Configure Vorta, by setting:
- remote repo
- directories to backup and to exclude
- pruning strategy
- backup frequency
If Vorta complains about
borg
not being installed on the server (while it actually is1), add the following to theauthorized_keys
on the ssh server:$ cat ~/.ssh/authorized_keys command="/usr/local/bin/borg serve --restrict-to-path /path/to/repo",restrict ssh-rsa AAAAB3[...]
Useful links
- Borg homepage
- Borg documentation, the official Borg documentation
- How to roll your own backup solution with BorgBackup, Rclone, and Wasabi cloud storage describes a script-based setup, which can be used on any OS
Footnotes:
Notice that borg does not need to be installed on the server for Borg to work, but it works better if you do.