Add "borg serve" like "rsync --server" and "rclone serve"

Problem/Justification

TrueNAS Scale would make a perfect backup target for BorgBackup (see borgbackup dot org) if the binary was available in the host system, and could be used via a remote ssh command.

Adding it as a container service is complex, error-prone and not necessarily future-compatible.

Impact

There are no apparent disadvantages (adding it merely involves installing the BSD-licensed Debian package “borgbackup” to the installation, either directly, or via the same mechanism rclone is added per github truenas/rclone).

The primary advantage is making the TrueNAS system a target for BorgBackups, which offers:

  • Space efficient storage of backups.
  • Secure, authenticated encryption.
  • Compression: lz4, zstd, zlib, lzma or none.
  • Mountable backups with FUSE.

User Story
As a User, I want to enable sending Borg Backups to my TrueNAS system by adding an SSH key allowed to call the borg binary handling backup repository access.

alternative:

As a User, I want to enable my TrueNAS system as a repository host for Borg Backups, so I can send encrypted backups from any of my other systems.

care to dive into the complexity of running borg in a container? I’m running a single borg container (nold360/borgserver) doing 2 repos w/ different ssh keys just fine.

only thing I had to do was make a dataset, expose the port on the host, and add the keys.

the only benefit I can see with it being on the host is being about to mount mount it with FUSE. but really you shouldn’t be messing with your target, you should restore via ssh on the host if need-be.

For reference ZFS replication is done on the host because it has to be, those commands are privileged and touch the host filesystems directly.

1 Like

Yep, I can see them adding it as an app/container but being an appliance I can’t see ix adding more to maintain to the OS. They removed rsync server and added rsyncd as an app, so a borg-server or borgbackup app makes snese

1 Like