mirror of
https://github.com/borgbackup/borg.git
synced 2026-09-01 14:13:19 +02:00
All command lines were executed against scratch repositories and all output samples regenerated from real runs (prettified, not invented): - recreate: the example used the removed --recompress; show borg repo-compress instead; refresh the borg info samples. - diff: default/text output has modified:/added:/removed: labels and mtime/ctime brackets now; the JSON-lines example used borg1 keys and lacked --json-lines on the command; add --content-only. - mount: example passed the repository as a positional (it would have been taken as the mountpoint); use -r. - tar: the archive-copy loop was a bash syntax error and used borg list with repo-list-only format keys; replaced with a working while-read loop over borg repo-list (verified end-to-end, identical archive contents in the destination repo). - key: regenerate repo-create/change-passphrase samples (hex-id named keyfiles, Key location line, no "Synchronizing index"); the import example silently did nothing without --key-location=keyfile; fix the Windows keys path (AppData\Local, not Roaming); explain why the keyfile name changes on passphrase change. - transfer: the borg1->borg2 upgrade steps were missing --from-borg1 and used a ssh:// destination URL (rejected for current repos); fix the Windows keys path. - notes: --noatime and --nobsdflags no longer exist (atime is opt-in via --atime); stray "|" removed. - compact: segments wording removed. - info/repo-info/repo-delete/list/find: output samples regenerated (new labels/order, UTC offsets, repo version line, prompt text; isomtime format and symlink size corrected in list). - general: fix broken inline markup (stray backtick). - serve: the authorized_keys forced command needs --rest (it is deliberately not client-suppliable); document the actual client argument allowlist including --backend. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
47 lines
2.2 KiB
ReStructuredText
47 lines
2.2 KiB
ReStructuredText
.. include:: list.rst.inc
|
|
|
|
Examples
|
|
~~~~~~~~
|
|
::
|
|
|
|
$ borg list root-2016-02-15
|
|
drwxr-xr-x root root 0 Mon, 2016-02-15 17:44:27 +0100 .
|
|
drwxrwxr-x root root 0 Mon, 2016-02-15 19:04:49 +0100 bin
|
|
-rwxr-xr-x root root 1029624 Thu, 2014-11-13 00:08:51 +0100 bin/bash
|
|
lrwxrwxrwx root root 6 Fri, 2015-03-27 20:24:26 +0100 bin/bzcmp -> bzdiff
|
|
-rwxr-xr-x root root 2140 Fri, 2015-03-27 20:24:22 +0100 bin/bzdiff
|
|
...
|
|
|
|
$ borg list root-2016-02-15 --pattern "- bin/ba*"
|
|
drwxr-xr-x root root 0 Mon, 2016-02-15 17:44:27 +0100 .
|
|
drwxrwxr-x root root 0 Mon, 2016-02-15 19:04:49 +0100 bin
|
|
lrwxrwxrwx root root 6 Fri, 2015-03-27 20:24:26 +0100 bin/bzcmp -> bzdiff
|
|
-rwxr-xr-x root root 2140 Fri, 2015-03-27 20:24:22 +0100 bin/bzdiff
|
|
...
|
|
|
|
$ borg list archiveA --format="{mode} {user:6} {group:6} {size:8d} {isomtime} {path}{extra}{NEWLINE}"
|
|
drwxrwxr-x user user 0 2015-02-01T11:00:00.000000+01:00 .
|
|
drwxrwxr-x user user 0 2015-02-01T11:00:00.000000+01:00 code
|
|
drwxrwxr-x user user 0 2015-02-01T11:00:00.000000+01:00 code/myproject
|
|
-rw-rw-r-- user user 1416192 2015-02-01T11:00:00.000000+01:00 code/myproject/file.ext
|
|
-rw-rw-r-- user user 1416192 2015-02-01T11:00:00.000000+01:00 code/myproject/file.text
|
|
...
|
|
|
|
$ borg list archiveA --pattern '+ re:\.ext$' --pattern '- re:^.*$'
|
|
-rw-rw-r-- user user 1416192 Sun, 2015-02-01 11:00:00 +0100 code/myproject/file.ext
|
|
...
|
|
|
|
$ borg list archiveA --pattern '+ re:.ext$' --pattern '- re:^.*$'
|
|
-rw-rw-r-- user user 1416192 Sun, 2015-02-01 11:00:00 +0100 code/myproject/file.ext
|
|
-rw-rw-r-- user user 1416192 Sun, 2015-02-01 11:00:00 +0100 code/myproject/file.text
|
|
...
|
|
|
|
# Use --sort-by with a comma-separated list; sorts apply stably from last to first.
|
|
# Here: primary by size descending, tie-breaker by path ascending.
|
|
# Note the quoting - ">" would otherwise be a shell redirection.
|
|
$ borg list archiveA --sort-by='>size,path' --format='{size:8d} {path}{NL}'
|
|
1416192 code/myproject/file.ext
|
|
1416192 code/myproject/file.text
|
|
0 .
|
|
...
|
|
|