From 00255a2437353077055dbc9e7b267229182e5a38 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 18 Aug 2022 10:19:11 -0700 Subject: [PATCH] Various documentation edits for Borg 2 (#557). --- docs/how-to/extract-a-backup.md | 24 +++++++++++++----------- docs/how-to/monitor-your-backups.md | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/how-to/extract-a-backup.md b/docs/how-to/extract-a-backup.md index a8ae9c5..62bdc75 100644 --- a/docs/how-to/extract-a-backup.md +++ b/docs/how-to/extract-a-backup.md @@ -31,10 +31,9 @@ and therefore the latest timestamp, run a command like: borgmatic extract --archive host-2019-01-02T04:06:07.080910 ``` -(No borgmatic `extract` action? Try the old-style `--extract`, or upgrade -borgmatic!) +(No borgmatic `extract` action? Upgrade borgmatic!) -With newer versions of borgmatic, you can simplify this to: +Or simplify this to: ```bash borgmatic extract --archive latest @@ -42,7 +41,8 @@ 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. +in the right place before running the command—or see below about the +`--destination` flag. ## Repository selection @@ -64,13 +64,15 @@ everything from an archive. To do that, tack on one or more `--path` values. For instance: ```bash -borgmatic extract --archive host-2019-... --path path/1 path/2 +borgmatic extract --archive latest --path path/1 path/2 ``` Note that the specified restore paths should not have a leading slash. Like a -whole-archive extract, this also extracts into the current directory. So for -example, if you happen to be in the directory `/var` and you run the `extract` -command above, borgmatic will extract `/var/path/1` and `/var/path/2`. +whole-archive extract, this also extracts into the current directory by +default. So for example, if you happen to be in the directory `/var` and you +run the `extract` command above, borgmatic will extract `/var/path/1` and +`/var/path/2`. + ## Extract to a particular destination @@ -79,7 +81,7 @@ extract files to a particular destination directory, use the `--destination` flag: ```bash -borgmatic extract --archive host-2019-... --destination /tmp +borgmatic extract --archive latest --destination /tmp ``` When using the `--destination` flag, be careful not to overwrite your system's @@ -103,7 +105,7 @@ archive as a [FUSE](https://en.wikipedia.org/wiki/Filesystem_in_Userspace) filesystem, you can use the `borgmatic mount` action. Here's an example: ```bash -borgmatic mount --archive host-2019-... --mount-point /mnt +borgmatic mount --archive latest --mount-point /mnt ``` This mounts the entire archive on the given mount point `/mnt`, so that you @@ -126,7 +128,7 @@ your archive, use the `--path` flag, similar to the `extract` action above. For instance: ```bash -borgmatic mount --archive host-2019-... --mount-point /mnt --path var/lib +borgmatic mount --archive latest --mount-point /mnt --path var/lib ``` When you're all done exploring your files, unmount your mount point. No diff --git a/docs/how-to/monitor-your-backups.md b/docs/how-to/monitor-your-backups.md index f8c21bb..7e62dac 100644 --- a/docs/how-to/monitor-your-backups.md +++ b/docs/how-to/monitor-your-backups.md @@ -319,8 +319,8 @@ hooks: ## Scripting borgmatic To consume the output of borgmatic in other software, you can include an -optional `--json` flag with `create`, `list`, or `info` to get the output -formatted as JSON. +optional `--json` flag with `create`, `rlist`, `rinfo`, or `info` to get the +output formatted as JSON. Note that when you specify the `--json` flag, Borg's other non-JSON output is suppressed so as not to interfere with the captured JSON. Also note that JSON