diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md index 0ea771f90..49f2af61e 100644 --- a/docs/how-to/backup-your-databases.md +++ b/docs/how-to/backup-your-databases.md @@ -112,6 +112,12 @@ borgmatic restore --archive host-2019-01-02T04:06:07.080910 (No borgmatic `restore` action? Upgrade borgmatic!) +With newer versions of borgmatic, you can simplify this to: + +```bash +borgmatic restore --archive latest +``` + The `--archive` value is the name of the archive to restore from. This restores all databases dumps that borgmatic originally backed up to that archive. diff --git a/docs/how-to/extract-a-backup.md b/docs/how-to/extract-a-backup.md index c45a3df36..bc0bb233b 100644 --- a/docs/how-to/extract-a-backup.md +++ b/docs/how-to/extract-a-backup.md @@ -31,6 +31,12 @@ borgmatic extract --archive host-2019-01-02T04:06:07.080910 (No borgmatic `extract` action? Try the old-style `--extract`, or upgrade borgmatic!) +With newer versions of borgmatic, you can simplify this to: + +```bash +borgmatic extract --archive latest +``` + The `--archive` value is the name of the archive to extract. This extracts the entire contents of the archive to the current directory, so make sure you're in the right place before running the command. @@ -106,6 +112,12 @@ Omit the `--archive` flag to mount all archives (lazy-loaded): borgmatic mount --mount-point /mnt ``` +Or use the "latest" value for the archive to mount the latest successful archive: + +```bash +borgmatic mount --archive latest --mount-point /mnt +``` + If you'd like to restrict the mounted filesystem to only particular paths from your archive, use the `--path` flag, similar to the `extract` action above. For instance: diff --git a/docs/how-to/monitor-your-backups.md b/docs/how-to/monitor-your-backups.md index 064c4080e..56ae27bf4 100644 --- a/docs/how-to/monitor-your-backups.md +++ b/docs/how-to/monitor-your-backups.md @@ -261,6 +261,18 @@ multiple different hosts into a single repository, then you'll need to get fancier with your archive listing. See `borg list --help` for more flags. +### Latest backups + +All borgmatic actions that accept an "--archive" flag allow you to specify an +archive name of "latest". This lets you get the latest successful archive +without having to first run "borgmatic list" manually, which can be handy in +automated scripts. Here's an example: + +```bash +borgmatic info --archive latest +``` + + ## Related documentation * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/)