Various documentation edits for Borg 2 (#557).
This commit is contained in:
parent
b40e9b7da2
commit
00255a2437
2 changed files with 15 additions and 13 deletions
|
@ -31,10 +31,9 @@ and therefore the latest timestamp, run a command like:
|
||||||
borgmatic extract --archive host-2019-01-02T04:06:07.080910
|
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? Upgrade borgmatic!)
|
||||||
borgmatic!)
|
|
||||||
|
|
||||||
With newer versions of borgmatic, you can simplify this to:
|
Or simplify this to:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
borgmatic extract --archive latest
|
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
|
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—or see below about the
|
||||||
|
`--destination` flag.
|
||||||
|
|
||||||
|
|
||||||
## Repository selection
|
## Repository selection
|
||||||
|
@ -64,13 +64,15 @@ everything from an archive. To do that, tack on one or more `--path` values.
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
```bash
|
```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
|
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
|
whole-archive extract, this also extracts into the current directory by
|
||||||
example, if you happen to be in the directory `/var` and you run the `extract`
|
default. So for example, if you happen to be in the directory `/var` and you
|
||||||
command above, borgmatic will extract `/var/path/1` and `/var/path/2`.
|
run the `extract` command above, borgmatic will extract `/var/path/1` and
|
||||||
|
`/var/path/2`.
|
||||||
|
|
||||||
|
|
||||||
## Extract to a particular destination
|
## Extract to a particular destination
|
||||||
|
|
||||||
|
@ -79,7 +81,7 @@ extract files to a particular destination directory, use the `--destination`
|
||||||
flag:
|
flag:
|
||||||
|
|
||||||
```bash
|
```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
|
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:
|
filesystem, you can use the `borgmatic mount` action. Here's an example:
|
||||||
|
|
||||||
```bash
|
```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
|
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:
|
For instance:
|
||||||
|
|
||||||
```bash
|
```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
|
When you're all done exploring your files, unmount your mount point. No
|
||||||
|
|
|
@ -319,8 +319,8 @@ hooks:
|
||||||
## Scripting borgmatic
|
## Scripting borgmatic
|
||||||
|
|
||||||
To consume the output of borgmatic in other software, you can include an
|
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
|
optional `--json` flag with `create`, `rlist`, `rinfo`, or `info` to get the
|
||||||
formatted as JSON.
|
output formatted as JSON.
|
||||||
|
|
||||||
Note that when you specify the `--json` flag, Borg's other non-JSON output is
|
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
|
suppressed so as not to interfere with the captured JSON. Also note that JSON
|
||||||
|
|
Loading…
Reference in a new issue