From 8306b758e8ff2b1d87239a6c71727661860df374 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 17 Jul 2020 16:00:50 -0700 Subject: [PATCH] Add documentation on how to make backups redundant with multiple repositories. --- NEWS | 2 + README.md | 1 + ...movable-drive-or-an-intermittent-server.md | 1 + docs/how-to/make-backups-redundant.md | 47 +++++++++++++++++++ docs/how-to/make-per-application-backups.md | 1 + docs/how-to/set-up-backups.md | 8 ++++ 6 files changed, 60 insertions(+) create mode 100644 docs/how-to/make-backups-redundant.md diff --git a/NEWS b/NEWS index 5342b52..da8088e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ * #339: Fix for intermittent timing-related test failure of logging function. * Clarify database documentation about excluding named pipes and character/block devices to prevent hangs. + * Add documentation on how to make backups redundant with multiple repositories: + https://torsion.org/borgmatic/docs/how-to/make-backups-redundant/ 1.5.8 * #336: Fix for traceback when running Cronitor, Cronhub, and PagerDuty monitor hooks. diff --git a/README.md b/README.md index 7b0fa3c..18028d1 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ borgmatic is powered by [Borg Backup](https://www.borgbackup.org/). * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/) ⬅ *Start here!* * [Make per-application backups](https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/) + * [Make backups redundant](https://torsion.org/borgmatic/docs/how-to/make-backups-redundant/) * [Deal with very large backups](https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/) * [Inspect your backups](https://torsion.org/borgmatic/docs/how-to/inspect-your-backups/) * [Monitor your backups](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/) diff --git a/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md b/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md index 4ab1b03..e2e5a17 100644 --- a/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md +++ b/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server.md @@ -103,5 +103,6 @@ There are some caveats you should be aware of with this feature. * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/) * [Make per-application backups](https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/) + * [Make backups redundant](https://torsion.org/borgmatic/docs/how-to/make-backups-redundant/) * [Add preparation and cleanup steps to backups](https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/) * [Monitor your backups](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/) diff --git a/docs/how-to/make-backups-redundant.md b/docs/how-to/make-backups-redundant.md new file mode 100644 index 0000000..cb75513 --- /dev/null +++ b/docs/how-to/make-backups-redundant.md @@ -0,0 +1,47 @@ +--- +title: How to make backups redundant +--- +## 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: + +```yaml +location: + # List of source directories to backup. + source_directories: + - /home + - /etc + + # Paths of local or remote repositories to backup to. + repositories: + - 1234@usw-s001.rsync.net:backups.borg + - k8pDxu32@k8pDxu32.repo.borgbase.com:repo + - /var/lib/backups/local.borg +``` + +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: + +1. Backup `/home` and `/etc` to `1234@usw-s001.rsync.net:backups.borg` +2. Backup `/home` and `/etc` to `k8pDxu32@k8pDxu32.repo.borgbase.com:repo` +3. 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](https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls) +for more information on how to specify local and remote repository paths. + + +## Related documentation + + * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/) + * [Make per-application backups](https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/) + * [Backup to a removable drive or an intermittent server](https://torsion.org/borgmatic/docs/how-to/backup-to-a-removable-drive-or-an-intermittent-server/) diff --git a/docs/how-to/make-per-application-backups.md b/docs/how-to/make-per-application-backups.md index 8d08ac2..a893308 100644 --- a/docs/how-to/make-per-application-backups.md +++ b/docs/how-to/make-per-application-backups.md @@ -153,3 +153,4 @@ that your shell may interpret. ## Related documentation * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/) + * [Make backups redundant](https://torsion.org/borgmatic/docs/how-to/make-backups-redundant/) diff --git a/docs/how-to/set-up-backups.md b/docs/how-to/set-up-backups.md index 9ecceec..fbe347b 100644 --- a/docs/how-to/set-up-backups.md +++ b/docs/how-to/set-up-backups.md @@ -150,6 +150,13 @@ FAQ](http://borgbackup.readthedocs.io/en/stable/faq.html#how-can-i-specify-the-e for more info. +### Redundancy + +If you'd like to configure your backups to go to multiple different +repositories, see the documentation on how to [make backups +redundant](https://torsion.org/borgmatic/docs/how-to/make-backups-redundant/). + + ### Validation If you'd like to validate that your borgmatic configuration is valid, the @@ -311,6 +318,7 @@ it. ## Related documentation * [Make per-application backups](https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/) + * [Make backups redundant](https://torsion.org/borgmatic/docs/how-to/make-backups-redundant/) * [Deal with very large backups](https://torsion.org/borgmatic/docs/how-to/deal-with-very-large-backups/) * [Inspect your backups](https://torsion.org/borgmatic/docs/how-to/inspect-your-backups/) * [Monitor your backups](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/)