Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Guide to Managing Backups with BorgBackup

Digital solution partner

Guide to Managing Backups with BorgBackup

1. Installing BorgBackup

BorgBackup can be installed on Linux, macOS, and other Unix-like systems.

On Debian/Ubuntu

On RedHat/CentOS

On macOS with Homebrew

On QNAP

To install BorgBackup on QNAP, you need to use the QNAP QTS management system with Entware. Follow these steps:

  1. Install Entware through the QNAP App Center.
  2. Connect to the QNAP via SSH and update Entware:
  3. Install BorgBackup with the following command:
  4. Verify the installation:

2. Creating a New Repository

Before creating a backup, you need to initialize a Borg repository.

You can also use remote repositories via SSH:

3. Creating a Backup

To create a backup, use the create command:

Example:

4. Verifying a Backup

You can verify the integrity of a backup with:

5. Pruning: Managing Retention

To maintain a sensible retention policy, use the prune command:

This will keep 7 daily backups, 4 weekly backups, and 6 monthly backups.

6. Extracting a Backup

To restore files or directories, use the extract command:

You can extract a single file:

You can also mount a backup as a disk on a Linux/Debian/Ubuntu system to explore files:

To unmount:

7. Listing Archives

To list the backups present in the repository:

8. Connecting to a Remote Repository

To connect to a remote repository and create a backup, use the following syntax:

Example:

9. Useful Commands

  • Repository size:
  • Remove a specific archive:

Conclusion

BorgBackup is a powerful tool for managing incremental and compressed backups. It can be easily automated with cron jobs or scripts.