Rename repository actions for compatibility with recent Borg 2 changes (#915).
This commit is contained in:
@@ -4,7 +4,7 @@ COPY . /app
|
||||
RUN apk add --no-cache py3-pip py3-ruamel.yaml py3-ruamel.yaml.clib
|
||||
RUN pip install --break-system-packages --no-cache /app && generate-borgmatic-config && chmod +r /etc/borgmatic/config.yaml
|
||||
RUN borgmatic --help > /command-line.txt \
|
||||
&& for action in rcreate transfer create prune compact check delete extract config "config bootstrap" "config generate" "config validate" export-tar mount umount rdelete restore rlist list rinfo info break-lock "key export" "key change-passphrase" borg; do \
|
||||
&& for action in repo-create transfer create prune compact check delete extract config "config bootstrap" "config generate" "config validate" export-tar mount umount repo-delete restore repo-list list repo-info info break-lock "key export" "key change-passphrase" borg; do \
|
||||
echo -e "\n--------------------------------------------------------------------------------\n" >> /command-line.txt \
|
||||
&& borgmatic $action --help >> /command-line.txt; done
|
||||
RUN /app/docs/fetch-contributors >> /contributors.html
|
||||
|
||||
@@ -311,13 +311,14 @@ borgmatic does not currently create a database upon restore.
|
||||
|
||||
To restore a database dump from an archive, use the `borgmatic restore`
|
||||
action. But the first step is to figure out which archive to restore from. A
|
||||
good way to do that is to use the `rlist` action:
|
||||
good way to do that is to use the `repo-list` action:
|
||||
|
||||
```bash
|
||||
borgmatic rlist
|
||||
borgmatic repo-list
|
||||
```
|
||||
|
||||
(No borgmatic `rlist` action? Try `list` instead or upgrade borgmatic!)
|
||||
(No borgmatic `repo-list` action? Try `rlist` or `list` instead or upgrade
|
||||
borgmatic!)
|
||||
|
||||
That should yield output looking something like:
|
||||
|
||||
|
||||
@@ -9,13 +9,14 @@ eleventyNavigation:
|
||||
|
||||
When the worst happens—or you want to test your backups—the first step is
|
||||
to figure out which archive to extract. A good way to do that is to use the
|
||||
`rlist` action:
|
||||
`repo-list` action:
|
||||
|
||||
```bash
|
||||
borgmatic rlist
|
||||
borgmatic repo-list
|
||||
```
|
||||
|
||||
(No borgmatic `rlist` action? Try `list` instead or upgrade borgmatic!)
|
||||
(No borgmatic `repo-list` action? Try `rlist` or `list` instead or upgrade
|
||||
borgmatic!)
|
||||
|
||||
That should yield output looking something like:
|
||||
|
||||
|
||||
@@ -62,13 +62,13 @@ for available values.
|
||||
|
||||
(No borgmatic `list` or `info` actions? Upgrade borgmatic!)
|
||||
|
||||
<span class="minilink minilink-addedin">New in borgmatic version 1.7.0</span>
|
||||
There are also `rlist` and `rinfo` actions for displaying repository
|
||||
<span class="minilink minilink-addedin">New in borgmatic version 1.8.15</span>
|
||||
There are also `repo-list` and `repo-info` actions for displaying repository
|
||||
information with Borg 2.x:
|
||||
|
||||
```bash
|
||||
borgmatic rlist
|
||||
borgmatic rinfo
|
||||
borgmatic repo-list
|
||||
borgmatic repo-info
|
||||
```
|
||||
|
||||
See the [borgmatic command-line
|
||||
|
||||
@@ -92,10 +92,10 @@ timestamp in a particular format.
|
||||
<span class="minilink minilink-addedin">New in version 1.7.11</span> borgmatic
|
||||
uses the `archive_name_format` option to automatically limit which archives
|
||||
get used for actions operating on multiple archives. This prevents, for
|
||||
instance, duplicate archives from showing up in `rlist` or `info` results—even
|
||||
if the same repository appears in multiple borgmatic configuration files. To
|
||||
take advantage of this feature, use a different `archive_name_format` in each
|
||||
configuration file.
|
||||
instance, duplicate archives from showing up in `repo-list` or `info`
|
||||
results—even if the same repository appears in multiple borgmatic
|
||||
configuration files. To take advantage of this feature, use a different
|
||||
`archive_name_format` in each configuration file.
|
||||
|
||||
Under the hood, borgmatic accomplishes this by substituting globs for certain
|
||||
ephemeral data placeholders in your `archive_name_format`—and using the result
|
||||
@@ -113,7 +113,7 @@ this option in the `storage:` section of your configuration.
|
||||
borgmatic considers `{now}` an emphemeral data placeholder that will probably
|
||||
change per archive, while `{hostname}` won't. So it turns the example value
|
||||
into `{hostname}-user-data-*` and applies it to filter down the set of
|
||||
archives used for actions like `rlist`, `info`, `prune`, `check`, etc.
|
||||
archives used for actions like `repo-list`, `info`, `prune`, `check`, etc.
|
||||
|
||||
The end result is that when borgmatic runs the actions for a particular
|
||||
application-specific configuration file, it only operates on the archives
|
||||
|
||||
@@ -566,8 +566,8 @@ Resend Notification every X times = 1
|
||||
## Scripting borgmatic
|
||||
|
||||
To consume the output of borgmatic in other software, you can include an
|
||||
optional `--json` flag with `create`, `rlist`, `rinfo`, or `info` to get the
|
||||
output formatted as JSON.
|
||||
optional `--json` flag with `create`, `repo-list`, `repo-info`, 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
|
||||
@@ -578,7 +578,7 @@ output only shows up at the console and not in syslog.
|
||||
|
||||
All borgmatic actions that accept an `--archive` flag allow you to specify an
|
||||
archive name of `latest`. This lets you get the latest archive without having
|
||||
to first run `borgmatic rlist` manually, which can be handy in automated
|
||||
to first run `borgmatic repo-list` manually, which can be handy in automated
|
||||
scripts. Here's an example:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -45,10 +45,14 @@ be preferred though for most uses.)
|
||||
You can also specify Borg options for relevant commands. For instance:
|
||||
|
||||
```bash
|
||||
borgmatic borg rlist --short
|
||||
borgmatic borg repo-list --short
|
||||
```
|
||||
|
||||
This runs Borg's `rlist` command once on each configured borgmatic repository.
|
||||
(No borgmatic `repo-list` action? Try `rlist` or `list` instead or upgrade
|
||||
borgmatic!)
|
||||
|
||||
This runs Borg's `repo-list` command once on each configured borgmatic
|
||||
repository.
|
||||
|
||||
What if you only want to run Borg on a single configured borgmatic repository
|
||||
when you've got several configured? Not a problem. The `--repository` argument
|
||||
|
||||
@@ -214,11 +214,11 @@ command like the following with Borg 1.x:
|
||||
sudo borgmatic init --encryption repokey
|
||||
```
|
||||
|
||||
<span class="minilink minilink-addedin">New in borgmatic version 1.7.0</span>
|
||||
<span class="minilink minilink-addedin">New in borgmatic version 1.8.15</span>
|
||||
Or, with Borg 2.x:
|
||||
|
||||
```bash
|
||||
sudo borgmatic rcreate --encryption repokey-aes-ocb
|
||||
sudo borgmatic repo-create --encryption repokey-aes-ocb
|
||||
```
|
||||
|
||||
(Note that `repokey-chacha20-poly1305` may be faster than `repokey-aes-ocb` on
|
||||
|
||||
@@ -93,7 +93,7 @@ Borg releases require additional steps that borgmatic can help with.
|
||||
|
||||
### Borg 1.2 to 2.0
|
||||
|
||||
<span class="minilink minilink-addedin">New in borgmatic version 1.7.0</span>
|
||||
<span class="minilink minilink-addedin">New in borgmatic version 1.8.15</span>
|
||||
Upgrading Borg from 1.2 to 2.0 requires manually upgrading your existing Borg
|
||||
1 repositories before use with Borg or borgmatic. Here's how you can
|
||||
accomplish that.
|
||||
@@ -125,11 +125,11 @@ option was found in the `location:` section of your configuration.
|
||||
<span class="minilink minilink-addedin">Prior to version 1.7.10</span> Omit
|
||||
the `path:` portion of the `repositories` list.
|
||||
|
||||
Then, run the `rcreate` action (formerly `init`) to create that new Borg 2
|
||||
Then, run the `repo-create` action (formerly `init`) to create that new Borg 2
|
||||
repository:
|
||||
|
||||
```bash
|
||||
borgmatic rcreate --verbosity 1 --encryption repokey-blake2-aes-ocb \
|
||||
borgmatic repo-create --verbosity 1 --encryption repokey-blake2-aes-ocb \
|
||||
--source-repository original.borg --repository upgraded.borg
|
||||
```
|
||||
|
||||
@@ -146,12 +146,12 @@ means the encryption value you specified doesn't correspond to your source
|
||||
repository's chunk ID algorithm. In that case, try not using `blake2`:
|
||||
|
||||
```bash
|
||||
borgmatic rcreate --verbosity 1 --encryption repokey-aes-ocb \
|
||||
borgmatic repo-create --verbosity 1 --encryption repokey-aes-ocb \
|
||||
--source-repository original.borg --repository upgraded.borg
|
||||
```
|
||||
|
||||
Read about [Borg encryption
|
||||
modes](https://borgbackup.readthedocs.io/en/2.0.0b8/usage/rcreate.html#encryption-mode-tldr)
|
||||
modes](https://borgbackup.readthedocs.io/en/latest/usage/repo-create.html)
|
||||
for more details.
|
||||
|
||||
To transfer data from your original Borg 1 repository to your newly created
|
||||
|
||||
Reference in New Issue
Block a user