Having a solid data backup strategy is imperative in keeping your data safe. Your storage drives won’t last forever. Also, hardware failure is just one way you can lose data. Even though Linux is less at risk of nasties like ransomware attacks than other operating systems, it offers no protection from things like natural disasters.
Probably one of the most important software applications, but often neglected, is the backup program. The best Linux backup software will keep you covered when you accidentally delete files, or when a disk bites the dust. Backup software protects a variety of file types, including documents, databases, photos, music, and videos. Backup software provides an automated solution for creating, managing, and restoring data from backups.
There are different types of backup software including full backup software, incremental backup software, and image backup software.
borgmatic is simple, configuration-driven backup software for servers and workstations. It seeks to offer an easy-to-use and flexible solution for creating backups using Borg Backup. This is free and open source software.
Installation
We tested borgmatic using Ubuntu 23.10.
On our test system, we already have Borg installed. But if you don’t, you may need to install Borg as borgmatic may not install Borg automatically. Whether it does depends on your installation method.
There’s a package in the standard Ubuntu repositories for borgmatic. This can be installed with the command:
$ sudo apt install borgmatic
The package will install Borg Backup if it’s not installed.
This deb package gives borgmatic 1.7.9.
That version was released in March 2023, and is therefore missing over a year’s development. At the time of writing, the current version is 1.8.7.
After installing, we need to generate a YAML configuration file. With a version prior to 1.7.15 we need to issue the command:
$ sudo generate-borgmatic-config
For versions from 1.7.15 the command is:
$ sudo borgmatic config generate
Either command generates a sample configuration file at /etc/borgmatic/config.yaml. We want to use a different path, so we issue the command:
$ generate-borgmatic-config --destination ~/.config/borgmatic/config.yaml
The generated config file offers a comprehensive listing of all the options available. In the config file, you’ll need to specify your source directories, as well as local or remote repositories. We also need to create a Borg repository so we have a destination for our backup archives.
Next page: Page 2 – In Operation
Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation
Page 3 – Summary