|
@@ -23,7 +23,7 @@ borg list
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| | ``--short`` | only print file/directory names, nothing else |
|
|
| | ``--short`` | only print file/directory names, nothing else |
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
- | | ``--format FORMAT``, ``--list-format FORMAT`` | specify format for file listing (default: "{mode} {user:6} {group:6} {size:8d} {mtime} {path}{extra}{NL}") |
|
|
|
|
|
|
+ | | ``--format FORMAT``, ``--list-format FORMAT`` | specify format for file or archive listing (default for files: "{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}"; for archives: "{archive:<36} {time} [{id}]{NL}") |
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| | ``--json`` | Only valid for listing repository contents. Format output as JSON. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available. |
|
|
| | ``--json`` | Only valid for listing repository contents. Format output as JSON. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available. |
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
@@ -51,9 +51,9 @@ borg list
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
|
|
| | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
- | | ``--pattern PATTERN`` | experimental: include/exclude paths matching PATTERN |
|
|
|
|
|
|
+ | | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
- | | ``--patterns-from PATTERNFILE`` | experimental: read include/exclude patterns from PATTERNFILE, one per line |
|
|
|
|
|
|
+ | | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
+-----------------------------------------------------------------------------+-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. raw:: html
|
|
.. raw:: html
|
|
@@ -74,7 +74,7 @@ borg list
|
|
|
|
|
|
optional arguments
|
|
optional arguments
|
|
--short only print file/directory names, nothing else
|
|
--short only print file/directory names, nothing else
|
|
- --format FORMAT, --list-format FORMAT specify format for file listing (default: "{mode} {user:6} {group:6} {size:8d} {mtime} {path}{extra}{NL}")
|
|
|
|
|
|
+ --format FORMAT, --list-format FORMAT specify format for file or archive listing (default for files: "{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}"; for archives: "{archive:<36} {time} [{id}]{NL}")
|
|
--json Only valid for listing repository contents. Format output as JSON. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available.
|
|
--json Only valid for listing repository contents. Format output as JSON. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "barchive" key is therefore not available.
|
|
--json-lines Only valid for listing archive contents. Format output as JSON Lines. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "bpath" key is therefore not available.
|
|
--json-lines Only valid for listing archive contents. Format output as JSON Lines. The form of ``--format`` is ignored, but keys used in it are added to the JSON output. Some keys are always present. Note: JSON can only represent text. A "bpath" key is therefore not available.
|
|
|
|
|
|
@@ -93,8 +93,8 @@ borg list
|
|
Exclusion options
|
|
Exclusion options
|
|
-e PATTERN, --exclude PATTERN exclude paths matching PATTERN
|
|
-e PATTERN, --exclude PATTERN exclude paths matching PATTERN
|
|
--exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
|
|
--exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
|
|
- --pattern PATTERN experimental: include/exclude paths matching PATTERN
|
|
|
|
- --patterns-from PATTERNFILE experimental: read include/exclude patterns from PATTERNFILE, one per line
|
|
|
|
|
|
+ --pattern PATTERN include/exclude paths matching PATTERN
|
|
|
|
+ --patterns-from PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line
|
|
|
|
|
|
|
|
|
|
Description
|
|
Description
|
|
@@ -102,21 +102,50 @@ Description
|
|
|
|
|
|
This command lists the contents of a repository or an archive.
|
|
This command lists the contents of a repository or an archive.
|
|
|
|
|
|
-See the "borg help patterns" command for more help on exclude patterns.
|
|
|
|
|
|
+For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.
|
|
|
|
|
|
.. man NOTES
|
|
.. man NOTES
|
|
|
|
|
|
-The following keys are available for ``--format``:
|
|
|
|
|
|
+The FORMAT specifier syntax
|
|
|
|
++++++++++++++++++++++++++++
|
|
|
|
+
|
|
|
|
+The ``--format`` option uses python's `format string syntax
|
|
|
|
+<https://docs.python.org/3.8/library/string.html#formatstrings>`_.
|
|
|
|
+
|
|
|
|
+Examples:
|
|
|
|
+::
|
|
|
|
+
|
|
|
|
+ $ borg list --format '{archive}{NL}' /path/to/repo
|
|
|
|
+ ArchiveFoo
|
|
|
|
+ ArchiveBar
|
|
|
|
+ ...
|
|
|
|
+
|
|
|
|
+ # {VAR:NUMBER} - pad to NUMBER columns.
|
|
|
|
+ # Strings are left-aligned, numbers are right-aligned.
|
|
|
|
+ # Note: time columns except ``isomtime``, ``isoctime`` and ``isoatime`` cannot be padded.
|
|
|
|
+ $ borg list --format '{archive:36} {time} [{id}]{NL}' /path/to/repo
|
|
|
|
+ ArchiveFoo Thu, 2021-12-09 10:22:28 [0b8e9a312bef3f2f6e2d0fc110c196827786c15eba0188738e81697a7fa3b274]
|
|
|
|
+ $ borg list --format '{mode} {user:6} {group:6} {size:8} {mtime} {path}{extra}{NL}' /path/to/repo::ArchiveFoo
|
|
|
|
+ -rw-rw-r-- user user 1024 Thu, 2021-12-09 10:22:17 file-foo
|
|
|
|
+ ...
|
|
|
|
+
|
|
|
|
+ # {VAR:<NUMBER} - pad to NUMBER columns left-aligned.
|
|
|
|
+ # {VAR:>NUMBER} - pad to NUMBER columns right-aligned.
|
|
|
|
+ $ borg list --format '{mode} {user:>6} {group:>6} {size:<8} {mtime} {path}{extra}{NL}' /path/to/repo::ArchiveFoo
|
|
|
|
+ -rw-rw-r-- user user 1024 Thu, 2021-12-09 10:22:17 file-foo
|
|
|
|
+ ...
|
|
|
|
+
|
|
|
|
+The following keys are always available:
|
|
|
|
|
|
- NEWLINE: OS dependent line separator
|
|
- NEWLINE: OS dependent line separator
|
|
- NL: alias of NEWLINE
|
|
- NL: alias of NEWLINE
|
|
-- NUL: NUL character for creating print0 / xargs -0 like output, see barchive/bpath
|
|
|
|
|
|
+- NUL: NUL character for creating print0 / xargs -0 like output, see barchive and bpath keys below
|
|
- SPACE
|
|
- SPACE
|
|
- TAB
|
|
- TAB
|
|
- CR
|
|
- CR
|
|
- LF
|
|
- LF
|
|
|
|
|
|
-Keys for listing repository archives:
|
|
|
|
|
|
+Keys available only when listing archives in a repository:
|
|
|
|
|
|
- archive: archive name interpreted as text (might be missing non-text characters, see barchive)
|
|
- archive: archive name interpreted as text (might be missing non-text characters, see barchive)
|
|
- name: alias of "archive"
|
|
- name: alias of "archive"
|
|
@@ -128,12 +157,13 @@ Keys for listing repository archives:
|
|
- start: time (start) of creation of the archive
|
|
- start: time (start) of creation of the archive
|
|
- time: alias of "start"
|
|
- time: alias of "start"
|
|
- end: time (end) of creation of the archive
|
|
- end: time (end) of creation of the archive
|
|
|
|
+- command_line: command line which was used to create the archive
|
|
|
|
|
|
- hostname: hostname of host on which this archive was created
|
|
- hostname: hostname of host on which this archive was created
|
|
- username: username of user who created this archive
|
|
- username: username of user who created this archive
|
|
|
|
|
|
|
|
|
|
-Keys for listing archive files:
|
|
|
|
|
|
+Keys available only when listing files in an archive:
|
|
|
|
|
|
- type
|
|
- type
|
|
- mode
|
|
- mode
|
|
@@ -173,8 +203,6 @@ Keys for listing archive files:
|
|
- sha3_384
|
|
- sha3_384
|
|
- sha3_512
|
|
- sha3_512
|
|
- sha512
|
|
- sha512
|
|
-- shake_128
|
|
|
|
-- shake_256
|
|
|
|
|
|
|
|
- archiveid
|
|
- archiveid
|
|
- archivename
|
|
- archivename
|