瀏覽代碼

Documentation for "--archive latest" (#289).

Dan Helfman 5 年之前
父節點
當前提交
79f3b84ca2
共有 3 個文件被更改,包括 30 次插入0 次删除
  1. 6 0
      docs/how-to/backup-your-databases.md
  2. 12 0
      docs/how-to/extract-a-backup.md
  3. 12 0
      docs/how-to/monitor-your-backups.md

+ 6 - 0
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!)
 (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
 The `--archive` value is the name of the archive to restore from. This
 restores all databases dumps that borgmatic originally backed up to that
 restores all databases dumps that borgmatic originally backed up to that
 archive.
 archive.

+ 12 - 0
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
 (No borgmatic `extract` action? Try the old-style `--extract`, or upgrade
 borgmatic!)
 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
 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
 entire contents of the archive to the current directory, so make sure you're
 in the right place before running the command.
 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
 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
 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.
 your archive, use the `--path` flag, similar to the `extract` action above.
 For instance:
 For instance:

+ 12 - 0
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.
 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
 ## Related documentation
 
 
  * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/)
  * [Set up backups with borgmatic](https://torsion.org/borgmatic/docs/how-to/set-up-backups/)