In Operation
User interface and ease of use
Backup software should be easy to use. A clear and intuitive user interface will particularly be useful for non-technical users.
borgmatic is a strictly text-based affair. There is therefore no attractive frontend. To configure the software, you’ll need to be happy editing its config file. And be prepared to take time to read the documentation as there are a *lot* of configuration options.
For experienced users, this gives a lot of flexibility. For example, it makes it easy to create different backup policies for different applications on your system or for different backup repositories. We are not restricted in the same way as the GUI frontends, Vorta and Pika Backup are.
Automation and Scheduling
Performing backups manually is prone to mistakes, omissions, and delays. Good backup software should automate the backup process. Scheduling backups offers a level of consistency that helps keep the backup process reliable.
To automate backups on our Ubuntu test system is more complicated with borgbackup than the GUI frontends we tested. After a lot of experimentation, we settled on using systemd-timers. To make a timer work, we need a file with a .timer which defines how often the job is run, and a file with a .service which defines what commands are going to be executed.
Storing backups
Efficiency comes from avoiding duplication of file storage. File compression is also an important factor. Encryption ensures security of your files to protect from unauthorized access. Even if backup files are stolen, the actual data cannot be deciphered without a decryption key.
Courtesy of Borg Backup as the underlying software, deduplication technology is used. What does that mean? In essence this means borgbackup doesn’t copy known data again; it recognises if identical files or chunks of files are present in more than one backup, but only stores that data once. But you can still browse each backup as normal.
We recommend using encryption with a Borg repository. Whether you use a passphrase or a key file, we either set a borgmatic encryption_passphrase configuration variable, or the BORG_PASSPHRASE environment variable.
In the configuration file, we define the retention policy for how many backups to keep.
The borgmatic configuration lets you store a Borg repository passphrase or database password. But we prefer storing them outside of borgmatic. This isn’t complicated as borgmatic lets us call a password manager to retrieve the Borg passphrase to a repository.
By default borgmatic uses lz4 compression. This focuses on encoding/decoding speed rather than compression ratio. We can use other compression algorithms supported by Borg.
The optimal compression algorithm depends on a number of factors including the data stored, the write speed of the disk, as well as network speed.
Reporting and Testing
Regularly testing your data backup strategy is essential for ensuring that backups are functioning as expected and that any configuration changes don’t cause any unexpected errors. It also allows you to identify and address any backup issues.
There are a few choices available with borgbackup. We can monitor backups with job runner alerts, the on_error hook, or with third-party monitoring services. With the latter, borgmatic integrates with a variety of services and libraries.
We can specify the consistency checks to run to validate our backups.
- repository – checks the consistency of the repository.
- archives – checks all of the archives.
- data – verifies the integrity of the data within the archives.
- extract – an extraction dry-run of the most recent archive.
Customization
Backup software should allow you to customize your backups based on your requirements.
There is a lot of customization available from the borgmatic configuration file. The file itself contains lots of useful information to help you configure your backups.
Cloud support
Local backups won’t protect you from burglary or natural disasters.
A few hosting providers provide specific support for borgmatic including BorgBase and Hetzner. We can also backup via ssh to other servers.
Documentation
Good backup software will provide clear documentation that explains how to use the software.
borgmatic has decent documentation with a range of how-to guides together with reference guides for configuration and command-line reference.
Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation
Page 3 – Summary