2016-07-05 21:30:08 +00:00
.. IMPORTANT : this file is auto - generated from borg ' s built - in help , do not edit !
2015-11-13 15:42:16 +00:00
.. _borg_list :
borg list
---------
2017-06-06 22:44:53 +00:00
.. code - block :: none
2015-11-13 15:42:16 +00:00
2017-07-23 15:12:01 +00:00
borg [ common options ] list [ options ] [ REPOSITORY_OR_ARCHIVE ] [ PATH ... ]
2016-04-09 23:28:18 +00:00
2017-06-20 13:22:24 +00:00
.. only :: html
.. class :: borg - options - table
2022-01-23 14:52:21 +00:00
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ** positional arguments ** |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` REPOSITORY_OR_ARCHIVE `` | repository or archive to list contents of |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` PATH `` | paths to list ; patterns are supported |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ** optional arguments ** |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` -- consider - checkpoints `` | Show checkpoint archives in the repository contents list ( default : hidden ) . |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` -- short `` | only print file / directory names , nothing else |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` -- 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 - 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 . |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| .. class :: borg - common - opt - ref |
| |
| : ref : `common_options` |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ** Archive filters ** — Archive filters can be applied to repository targets . |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` - P PREFIX `` , `` -- prefix PREFIX `` | only consider archive names starting with this prefix . |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` - a GLOB `` , `` -- glob - archives GLOB `` | only consider archive names matching the glob . sh : rules apply , see " borg help patterns " . `` -- prefix `` and `` -- glob - archives `` are mutually exclusive . |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| | `` -- 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 |
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2022-02-05 16:22:33 +00:00
| | `` -- pattern PATTERN `` | include / exclude paths matching PATTERN |
2022-01-23 14:52:21 +00:00
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2022-02-05 16:22:33 +00:00
| | `` -- patterns - from PATTERNFILE `` | read include / exclude patterns from PATTERNFILE , one per line |
2022-01-23 14:52:21 +00:00
+-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2017-06-20 13:22:24 +00:00
.. raw :: html
< script type = 'text/javascript' >
2017-06-20 13:48:30 +00:00
$ ( document ) . ready ( function () {
2017-06-20 13:22:24 +00:00
$ ( '.borg-options-table colgroup' ) . remove ();
})
</ script >
.. only :: latex
REPOSITORY_OR_ARCHIVE
2019-09-06 22:27:17 +00:00
repository or archive to list contents of
2017-06-20 13:22:24 +00:00
PATH
paths to list ; patterns are supported
optional arguments
2020-04-12 17:51:49 +00:00
-- consider - checkpoints Show checkpoint archives in the repository contents list ( default : hidden ) .
2017-06-20 13:22:24 +00:00
-- short only print file / directory names , nothing else
2022-01-23 14:52:21 +00:00
-- 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} " )
2017-06-20 13:22:24 +00:00
-- 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 .
: ref : `common_options`
|
2017-07-23 15:12:01 +00:00
Archive filters
- P PREFIX , -- prefix PREFIX only consider archive names starting with this prefix .
- a GLOB , -- glob - archives GLOB only consider archive names matching the glob . sh : rules apply , see " borg help patterns " . `` -- prefix `` and `` -- glob - archives `` are mutually exclusive .
-- 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
2017-06-20 13:22:24 +00:00
Exclusion options
- e PATTERN , -- exclude PATTERN exclude paths matching PATTERN
-- exclude - from EXCLUDEFILE read exclude patterns from EXCLUDEFILE , one per line
2022-02-05 16:22:33 +00:00
-- pattern PATTERN include / exclude paths matching PATTERN
-- patterns - from PATTERNFILE read include / exclude patterns from PATTERNFILE , one per line
2017-06-20 09:49:26 +00:00
2017-03-26 23:45:45 +00:00
2015-11-13 15:42:16 +00:00
Description
~~~~~~~~~~~
This command lists the contents of a repository or an archive .
2016-03-18 11:17:57 +00:00
2022-02-19 17:47:47 +00:00
For more help on include / exclude patterns , see the : ref : `borg_patterns` command output .
2016-03-18 11:17:57 +00:00
2017-03-26 23:45:45 +00:00
.. man NOTES
2022-01-23 14:52:21 +00:00
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 [ 0 b8e9a312bef3f2f6e2d0fc110c196827786c15eba0188738e81697a7fa3b274 ]
$ 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 :
2017-02-05 20:32:24 +00:00
2017-06-18 00:10:10 +00:00
- NEWLINE : OS dependent line separator
- NL : alias of NEWLINE
2022-01-23 14:52:21 +00:00
- NUL : NUL character for creating print0 / xargs - 0 like output , see barchive and bpath keys below
2017-06-18 00:10:10 +00:00
- SPACE
- TAB
- CR
- LF
2016-06-21 13:18:19 +00:00
2022-01-23 14:52:21 +00:00
Keys available only when listing archives in a repository :
2017-02-05 20:32:24 +00:00
2017-07-23 15:12:01 +00:00
- archive : archive name interpreted as text ( might be missing non - text characters , see barchive )
2017-11-25 13:35:52 +00:00
- name : alias of " archive "
2017-06-18 00:10:10 +00:00
- barchive : verbatim archive name , can contain any character except NUL
2017-07-23 15:12:01 +00:00
- comment : archive comment interpreted as text ( might be missing non - text characters , see bcomment )
- bcomment : verbatim archive comment , can contain any character except NUL
2017-06-18 00:10:10 +00:00
- id : internal ID of the archive
2016-03-18 11:17:57 +00:00
2017-07-23 15:12:01 +00:00
- start : time ( start ) of creation of the archive
2017-11-25 13:35:52 +00:00
- time : alias of " start "
2017-07-23 15:12:01 +00:00
- end : time ( end ) of creation of the archive
2022-01-23 14:52:21 +00:00
- command_line : command line which was used to create the archive
2017-07-23 15:12:01 +00:00
2019-02-24 19:39:42 +00:00
- hostname : hostname of host on which this archive was created
- username : username of user who created this archive
2017-07-23 15:12:01 +00:00
2022-01-23 14:52:21 +00:00
Keys available only when listing files in an archive :
2017-02-05 20:32:24 +00:00
2017-06-18 00:10:10 +00:00
- type
- mode
- uid
- gid
- user
- group
- path : path interpreted as text ( might be missing non - text characters , see bpath )
- bpath : verbatim POSIX path , can contain any character except NUL
- source : link target for links ( identical to linktarget )
- linktarget
- flags
- size
- csize : compressed size
- dsize : deduplicated size
- dcsize : deduplicated compressed size
- num_chunks : number of chunks in this file
- unique_chunks : number of unique chunks in this file
- mtime
- ctime
- atime
- isomtime
- isoctime
- isoatime
2020-10-04 18:32:38 +00:00
- blake2b
- blake2s
2017-06-18 00:10:10 +00:00
- md5
- sha1
- sha224
- sha256
- sha384
2020-10-04 18:32:38 +00:00
- sha3_224
- sha3_256
- sha3_384
- sha3_512
2017-06-18 00:10:10 +00:00
- sha512
2019-09-06 22:27:17 +00:00
- xxh64 : XXH64 checksum of this file ( note : this is NOT a cryptographic hash ! )
2017-06-18 00:10:10 +00:00
- archiveid
- archivename
- extra : prepends { source } with " -> " for soft links and " link to " for hard links
- health : either " healthy " ( file ok ) or " broken " ( if file has all - zero replacement chunks )