diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md index f1f0087..2eaa1d0 100644 --- a/docs/how-to/backup-your-databases.md +++ b/docs/how-to/backup-your-databases.md @@ -338,6 +338,29 @@ within the database dump: borgmatic restore --archive latest --database users --schema tentant1 ``` +### Restore to an alternate host +New in version 1.7.15 You +can restore a database dump to a host other than the one from which it was +originally dumped. You can also change other connection parameters like the +username, password, and port. This can be done from the command line: + +```bash +borgmatic restore --archive latest --database users --hostname database2.example.org --port 5433 --username postgres --password trustsome1 +``` + +Or from the configuration file: + +```yaml +hooks: + postgresql_databases: + - name: users + hostname: database1.example.org + restore_hostname: database1.example.org + restore_port: 5433 + restore_username: postgres + restore_password: trustsome1 +``` + ### Limitations diff --git a/docs/how-to/extract-a-backup.md b/docs/how-to/extract-a-backup.md index 5a4aa6f..9751570 100644 --- a/docs/how-to/extract-a-backup.md +++ b/docs/how-to/extract-a-backup.md @@ -45,6 +45,22 @@ in the right place before running the command—or see below about the `--destination` flag. +## Extract the configuration file used to create an archive + +New in version 1.7.15 Borgmatic +also stores the configuration file used to create an archive, inside the +archive itself. This is useful in cases where you've lost your configuration +file, or you want to see what configuration was used to create a particular +archive. + +To extract the configuration file from an archive, use the `config bootstrap` action: + +```bash +borgmatic config bootstrap --repository repo.borg --destination /tmp +``` + +This extracts the configuration file from the latest archive in the repository `repo.borg` to `/tmp/config.yaml`. + ## Repository selection If you have a single repository in your borgmatic configuration file(s), no