[Borg & Borg Server] Deduplicated, encrypted and remote backups

Wohoo, mine as well! :slight_smile:

The situation is like:

  • homeYuno
    • has space for backup
    • create users and target dir here
  • VPSYunoA
    • no space for backup
    • add sshfs to fstab and install borg here
  • VPSYunoB
    • no space for backup
    • add sshfs to fstab and install borg here

VPSYuno* needs to do a remote backup, but I am not sure how to do it with Borg Server. Instead, I lure Borg Backup into thinking it is doing a local backup, while it is actually a remote backup via SSHFS.

On homeYuno:

  • add user vpsassh
    • add to (new) SSH-group in users/manage users and groups, with SSH-rights
  • create the backup destination
    • # su vpsassh -
    • $ mkdir -p ~/backup/vpsyunoa.tld/borg/

On VPSYunoA:

  • Prepare the SSH connection
    • `$ sudo su -
    • # ssh-keygen
    • # ssh-copy-id vpsassh@homeyuno.tld
    • (actually, because of an IPv6 problem on my side, # ssh-copy-id -o AddressFamily=inet vpsassh@homeyuno.tld )
  • Add a line to /etc/fstab and check mount/umount for errors
    • # mkdir /backup/borgremote/homeyuno/
    • # echo 'sshfs#vpsassh@homeyuno:/home/vpsassh/backups/vpsyunoa.tld/borg /backup/borgremote/homeyuno fuse _netdev,reconnect,allow_other, inet 0 0' >> /etc/fstab
    • The backup is written to root; I’m not sure whether it will recursively back up when I put it in a users’ directory in /home/*
    • # mount -a
    • # umount /backup/borgremote/homeyuno
    • # mount -a
    • # mount|grep backup
  • Install Borg Backup
    • I installed it via the web GUI
    • In which borg repository location do you want to backup your files ?
    • in: /backup/borgremote/homeyuno
    • change options to taste :wink:

The first backup ran with no problem. Checking contents from VPSYunoA:

# borg list /backup/borgremote/homeyuno
Enter passphrase for key /backup/borgremote/homeyuno:
_auto_conf-2021-11-08_00:00          Mon, 2021-11-08 00:00:12 [fabf407a6327e0fb941c7dbb43c901afda88837ca3c802eb2a19a9fcd76f00d]
_auto_data-2021-11-08_00:00          Mon, 2021-11-08 00:00:24 [4de8d16d1e3c925b5ab1e57ada3c21b25dd2254518fa6dc8bfd8f22ec0d4f9e]
_auto_borg-2021-11-08_00:01          Mon, 2021-11-08 00:01:07 [133de98e8b107411150d32d96aeb8bf5811805d7cb8f1a73ceba059972f783e]
_auto_element-2021-11-08_00:01       Mon, 2021-11-08 00:01:16 [e39d1b48910d50ed4340b4dc046865ac06c5362a0a078f9dcea22c3b4eb58ce]
_auto_hextris-2021-11-08_00:01       Mon, 2021-11-08 00:01:32 [1508fdb2bf91de8dd275381ba28ee5fa0d9c86746179174b23a8981a3d2ba2d]
...

I’ll be adding the other servers with different target directories on homeYuno, and install Borg Backup with slightly different windows to spread the load (this one took, according to timestamps, ~6 minutes for ~600M of backup, so things are not that wild).

So far I’m happy with the outcome!