summaryrefslogtreecommitdiffstats
path: root/docs/usage
diff options
context:
space:
mode:
Diffstat (limited to 'docs/usage')
-rw-r--r--docs/usage/check.rst.inc66
-rw-r--r--docs/usage/delete.rst.inc14
-rw-r--r--docs/usage/help.rst.inc38
-rw-r--r--docs/usage/info.rst.inc46
-rw-r--r--docs/usage/mount.rst.inc94
-rw-r--r--docs/usage/prune.rst.inc8
-rw-r--r--docs/usage/rcompress.rst.inc2
-rw-r--r--docs/usage/recreate.rst.inc4
-rw-r--r--docs/usage/rlist.rst.inc58
-rw-r--r--docs/usage/transfer.rst.inc54
10 files changed, 209 insertions, 175 deletions
diff --git a/docs/usage/check.rst.inc b/docs/usage/check.rst.inc
index c1d52cb13..d64e01128 100644
--- a/docs/usage/check.rst.inc
+++ b/docs/usage/check.rst.inc
@@ -12,35 +12,35 @@ borg check
.. class:: borg-options-table
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | **optional arguments** |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--repository-only`` | only perform repository checks |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--archives-only`` | only perform archives checks |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--verify-data`` | perform cryptographic archive data integrity verification (conflicts with ``--repository-only``) |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--repair`` | attempt to repair any inconsistencies found |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--save-space`` | work slower, but using less space |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--max-duration SECONDS`` | do only a partial repo check for max. SECONDS seconds (Default: unlimited) |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | .. class:: borg-common-opt-ref |
- | |
- | :ref:`common_options` |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | **Archive filters** — Archive filters can be applied to repository targets. |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``-a GLOB``, ``--glob-archives GLOB`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--first N`` | consider first N archives after other filters were applied |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--last N`` | consider last N archives after other filters were applied |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | **optional arguments** |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--repository-only`` | only perform repository checks |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--archives-only`` | only perform archives checks |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--verify-data`` | perform cryptographic archive data integrity verification (conflicts with ``--repository-only``) |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--repair`` | attempt to repair any inconsistencies found |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--save-space`` | work slower, but using less space |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--max-duration SECONDS`` | do only a partial repo check for max. SECONDS seconds (Default: unlimited) |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | .. class:: borg-common-opt-ref |
+ | |
+ | :ref:`common_options` |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | **Archive filters** — Archive filters can be applied to repository targets. |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--first N`` | consider first N archives after other filters were applied |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--last N`` | consider last N archives after other filters were applied |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
.. raw:: html
@@ -67,10 +67,10 @@ borg check
|
Archive filters
- -a GLOB, --glob-archives GLOB only consider archive names matching the glob. sh: rules apply, see "borg help patterns".
- --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
- --first N consider first N archives after other filters were applied
- --last N consider last N archives after other filters were applied
+ -a PATTERN, --match-archives PATTERN only consider archive names matching the pattern. see "borg help match-archives".
+ --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
+ --first N consider first N archives after other filters were applied
+ --last N consider last N archives after other filters were applied
Description
diff --git a/docs/usage/delete.rst.inc b/docs/usage/delete.rst.inc
index e341bd399..b3dde1498 100644
--- a/docs/usage/delete.rst.inc
+++ b/docs/usage/delete.rst.inc
@@ -37,7 +37,7 @@ borg delete
+-----------------------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+
| **Archive filters** — Archive filters can be applied to repository targets. |
+-----------------------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``-a GLOB``, ``--glob-archives GLOB`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". |
+ | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
+-----------------------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+
| | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
+-----------------------------------------------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------------------+
@@ -73,10 +73,10 @@ borg delete
|
Archive filters
- -a GLOB, --glob-archives GLOB only consider archive names matching the glob. sh: rules apply, see "borg help patterns".
- --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
- --first N consider first N archives after other filters were applied
- --last N consider last N archives after other filters were applied
+ -a PATTERN, --match-archives PATTERN only consider archive names matching the pattern. see "borg help match-archives".
+ --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
+ --first N consider first N archives after other filters were applied
+ --last N consider last N archives after other filters were applied
Description
@@ -94,8 +94,8 @@ deleted - the "Deleted data" deduplicated size there is most interesting as
that is how much your repository will shrink.
Please note that the "All archives" stats refer to the state after deletion.
-You can delete multiple archives by specifying a matching shell pattern,
-using the ``--glob-archives GLOB`` option (for more info on these patterns,
+You can delete multiple archives by specifying a matching pattern,
+using the ``--match-archives PATTERN`` option (for more info on these patterns,
see :ref:`borg_patterns`).
Always first use ``--dry-run --list`` to see what would be deleted. \ No newline at end of file
diff --git a/docs/usage/help.rst.inc b/docs/usage/help.rst.inc
index 2aac803e3..edf85c201 100644
--- a/docs/usage/help.rst.inc
+++ b/docs/usage/help.rst.inc
@@ -240,13 +240,47 @@ patternfile.lst::
This allows you to share the same patterns between multiple repositories
without needing to specify them on the command line.
+.. _borg_match-archives:
+
+borg help match-archives
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+The ``--match-archives`` option matches a given pattern against the list of all archive
+names in the repository.
+
+It uses pattern styles similar to the ones described by ``borg help patterns``:
+
+Identical match pattern, selector ``id:`` (default)
+ Simple string match, must fully match exactly as given.
+
+Shell-style patterns, selector ``sh:``
+ Match like on the shell, wildcards like `*` and `?` work.
+
+`Regular expressions <https://docs.python.org/3/library/re.html>`_, selector ``re:``
+ Full regular expression support.
+ This is very powerful, but can also get rather complicated.
+
+Examples::
+
+ # id: style
+ borg delete --match-archives 'id:archive-with-crap'
+ borg delete -a 'id:archive-with-crap' # same, using short option
+ borg delete -a 'archive-with-crap' # same, because 'id:' is the default
+
+ # sh: style
+ borg delete -a 'sh:home-kenny-*'
+
+ # re: style
+ borg delete -a 're:pc[123]-home-(user1|user2)-2022-09-.*'
+
.. _borg_placeholders:
borg help placeholders
~~~~~~~~~~~~~~~~~~~~~~
-Repository URLs, ``--name``, ``-a`` / ``--glob-archives``, ``--comment``
+Repository URLs, ``--name``, ``-a`` / ``--match-archives``, ``--comment``
and ``--remote-path`` values support these placeholders:
{hostname}
@@ -292,7 +326,7 @@ Examples::
borg create /path/to/repo::{hostname}-{user}-{utcnow} ...
borg create /path/to/repo::{hostname}-{now:%Y-%m-%d_%H:%M:%S%z} ...
- borg prune -a '{hostname}-*' ...
+ borg prune -a 'sh:{hostname}-*' ...
.. note::
systemd uses a difficult, non-standard syntax for command lines in unit files (refer to
diff --git a/docs/usage/info.rst.inc b/docs/usage/info.rst.inc
index 8cb156eaa..e5abdff69 100644
--- a/docs/usage/info.rst.inc
+++ b/docs/usage/info.rst.inc
@@ -12,25 +12,25 @@ borg info
.. class:: borg-options-table
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | **optional arguments** |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--json`` | format output as JSON |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | .. class:: borg-common-opt-ref |
- | |
- | :ref:`common_options` |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | **Archive filters** — Archive filters can be applied to repository targets. |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``-a GLOB``, ``--glob-archives GLOB`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--first N`` | consider first N archives after other filters were applied |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
- | | ``--last N`` | consider last N archives after other filters were applied |
- +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------+
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | **optional arguments** |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--json`` | format output as JSON |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | .. class:: borg-common-opt-ref |
+ | |
+ | :ref:`common_options` |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | **Archive filters** — Archive filters can be applied to repository targets. |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--first N`` | consider first N archives after other filters were applied |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
+ | | ``--last N`` | consider last N archives after other filters were applied |
+ +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
.. raw:: html
@@ -52,10 +52,10 @@ borg info
|
Archive filters
- -a GLOB, --glob-archives GLOB only consider archive names matching the glob. sh: rules apply, see "borg help patterns".
- --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
- --first N consider first N archives after other filters were applied
- --last N consider last N archives after other filters were applied
+ -a PATTERN, --match-archives PATTERN only consider archive names matching the pattern. see "borg help match-archives".
+ --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
+ --first N consider first N archives after other filters were applied
+ --last N consider last N archives after other filters were applied
Description
diff --git a/docs/usage/mount.rst.inc b/docs/usage/mount.rst.inc
index deb1a3cda..7992170c7 100644
--- a/docs/usage/mount.rst.inc
+++ b/docs/usage/mount.rst.inc
@@ -12,49 +12,49 @@ borg mount
.. class:: borg-options-table
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | **positional arguments** |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``MOUNTPOINT`` | where to mount filesystem |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``PATH`` | paths to extract; patterns are supported |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | **optional arguments** |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--consider-checkpoints`` | Show checkpoint archives in the repository contents list (default: hidden). |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``-f``, ``--foreground`` | stay in foreground, do not daemonize |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``-o`` | Extra mount options |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--numeric-ids`` | use numeric user and group identifiers from archive(s) |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | .. class:: borg-common-opt-ref |
- | |
- | :ref:`common_options` |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | **Archive filters** — Archive filters can be applied to repository targets. |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``-a GLOB``, ``--glob-archives GLOB`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--first N`` | consider first N archives after other filters were applied |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--last N`` | consider last N archives after other filters were applied |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | **Exclusion options** |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
- | | ``--strip-components NUMBER`` | Remove the specified number of leading path elements. Paths with fewer elements will be silently skipped. |
- +-----------------------------------------------------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | **positional arguments** |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``MOUNTPOINT`` | where to mount filesystem |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``PATH`` | paths to extract; patterns are supported |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | **optional arguments** |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``--consider-checkpoints`` | Show checkpoint archives in the repository contents list (default: hidden). |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``-f``, ``--foreground`` | stay in foreground, do not daemonize |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``-o`` | Extra mount options |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``--numeric-ids`` | use numeric user and group identifiers from archive(s) |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | .. class:: borg-common-opt-ref |
+ | |
+ | :ref:`common_options` |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | **Archive filters** — Archive filters can be applied to repository targets. |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``--first N`` | consider first N archives after other filters were applied |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | | ``--last N`` | consider last N archives after other filters were applied |
+ +-----------------------------------------------------------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------+
+ | **Exclusion options**