Skip to main content

Backup Mechanism

We use borg and borgmatic to create an automated backup procedure. Borg provides two main features: deduplication and off-site backups. From the official borg documentation:

Deduplication based on content-defined chunking is used to reduce the number of bytes stored: each file is split into a number of variable length chunks and only chunks that have never been seen before are added to the repository.

We also take advantage of the off-site backups feature. In particular, there is only one backup server, resposible for initialising the borg client repositories (one for each client) and producing their respective ssh keys. On the other hand, there are multiple clients that connect to the backup server via ssh. Server is also responsible to restrict clients to access only their own repositories.

Each client runs borg to perform the backup process, whereas borgmatic is used to better handle the configuration of the backups. The borgmatic configuration file contains information regarding backing up databases schemas (mysql or postgres) and user defined directories. Each client installation can be done in three different ways, depending on the client's needs.