Searching for a new backup tool

Monday, May 4, 2020

Searching for a new backup tool

I’ve been using the included Déjà Dup backup tool for my Ubuntu desktop, mostly for the contents of the home directory and some configuration files. The media library I backup manually using rsync to the same external WD My Cloud drive.

Déjà Dup is a graphical interface to Duplicity, and it runs in the background every night, without much intervention on my part. Every now and then (very often, to me), it has to re-build the backup and start over. It also has issues with permissions on the NFS-shared folder in the external drive.

At $work I’ve decided on a pull-model to the backups, where a centralized server using rsnapshot copies the files from every laptop and server via rsyncd. This is good enough for servers, but it’s proving to be inadequate for laptops and desktops.

These failings have been pushing me to explore alternatives; one of the tools I’ve been hearing about is Borg, a fork of a tool called Attic, which are supposed to be a new approach to managing consecutive backups in order to minimize both the storage space needed, and the amount of data that has to be sent on each iteration of the process.

Borg and Borgmatic

Despite being very easy to install on an Ubuntu system, and easy to get started initializing a repo for your backups, Borg will leave you completely on your own when it’s time to actually configure and run the backups.

How to define the files you want and the destination for each backup, as well as the names of the repos that you should give them, it’s all up to you, with no clear guidance either way.

That’s where Borgmatic comes in: a clear configuration file, with clearly defined ways to specify source and destination for backups, and the length of time to keep each one.

Something I didn’t expect, when I began following the Borgmatic documentation, was that the backups would now be performed by the root user. Since I was seeking to replace the included tool, I was hoping to keep doing this task as the regular desktop user. This ends up changing my entire approach to the task, beginning with the way I share the external drive with the main PC (Adding the dreaded no-root-squash option to the NFS share).

After doing a couple of test backups, I find it very hard to tell what files have been stored, and that information is not shown in the logs, no matter what level of debugging I set. This makes it very hard to debug the correct syntax for the include and exclude files, for which documentation is lacking.

The only way I’ve found to monitor the results of the backup is to mount the repository as a filesystem. And here the need for root to own the backup process comes to make things difficult. In order to comfortably navigate the entire subtree of backed up files, you probably want to run Nautilus as root, which has always been problematic.

Update: I’ve now found the command:

sudo borgmatic list --repository /mnt/<external_disk>/borg --archive latest

Another thing I’ve found confusing is how to move the backup process from a single system (using that system’s root user), to backing up the containers where I host my web apps. It’s not clear if I’m supposed to use different repos, or just putting everything into the same folder in the external drive.

I’ll probably keep running the backups manually for a couple of days, but if I don’t feel getting a more clear grasp on the process and how to exclude some folders from being backed up, I’ll keep looking into more user-oriented tools.