-
How-to guides
- 📥 Set up backups
- 🔀 Make per-application backups
- 🔒 Provide your passwords
- ☁️ Make backups redundant
- 📏 Deal with very large backups
- 🔎 Inspect your backups
- 🚨 Monitor your backups
- 📤 Extract a backup
- 🗄️ Backup your databases
- 📸 Snapshot your filesystems
- 🧹 Add preparation and cleanup steps
- 💾 Backup to a removable drive/server
- 🔧 Run arbitrary Borg commands
- 💥 Customize warnings/errors
- 📦 Upgrade borgmatic/Borg
- 🏗️ Develop on borgmatic
- Reference guides
Multiple repositories
If you really care about your data, you probably want more than one backup of it. borgmatic supports this in its configuration by specifying multiple backup repositories. Here's an example:
# List of source directories to backup.
source_directories:
- /home
- /etc
# Paths of local or remote repositories to backup to.
repositories:
- path: ssh://k8pDxu32@k8pDxu32.repo.borgbase.com/./repo
- path: /var/lib/backups/local.borg
Prior to version 1.8.0 Put
these options in the location:
section of your configuration.
Prior to version 1.7.10 Omit
the path:
portion of the repositories
list.
When you run borgmatic with this configuration, it invokes Borg once for each configured repository in sequence. (So, not in parallel.) That means—in each repository—borgmatic creates a single new backup archive containing all of your source directories.
Here's a way of visualizing what borgmatic does with the above configuration:
- Backup
/home
and/etc
tok8pDxu32@k8pDxu32.repo.borgbase.com:repo
- Backup
/home
and/etc
to/var/lib/backups/local.borg
This gives you redundancy of your data across repositories and even potentially across providers.
See Borg repository URLs documentation for more information on how to specify local and remote repository paths.
Different options per repository
What if you want borgmatic to backup to multiple repositories—while also setting different options for each one? In that case, you'll need to use a separate borgmatic configuration file for each repository instead of the multiple repositories in one configuration file as described above. That's because all of the repositories in a particular configuration file get the same options applied.
Improve this documentation
Have an idea on how to make this documentation even better? Use our issue tracker to send your feedback!