Update manpages and auto-completion

This commit is contained in:
Alexander Neumann 2021-02-14 11:44:20 +01:00
parent 1cb1cd6f44
commit 4e99a3d650
11 changed files with 126 additions and 24 deletions

View File

@ -282,6 +282,12 @@ _restic_backup()
flags+=("--files-from=")
two_word_flags+=("--files-from")
local_nonpersistent_flags+=("--files-from=")
flags+=("--files-from-raw=")
two_word_flags+=("--files-from-raw")
local_nonpersistent_flags+=("--files-from-raw=")
flags+=("--files-from-verbatim=")
two_word_flags+=("--files-from-verbatim")
local_nonpersistent_flags+=("--files-from-verbatim=")
flags+=("--force")
flags+=("-f")
local_nonpersistent_flags+=("--force")
@ -298,6 +304,8 @@ _restic_backup()
flags+=("--iexclude-file=")
two_word_flags+=("--iexclude-file")
local_nonpersistent_flags+=("--iexclude-file=")
flags+=("--ignore-ctime")
local_nonpersistent_flags+=("--ignore-ctime")
flags+=("--ignore-inode")
local_nonpersistent_flags+=("--ignore-inode")
flags+=("--one-file-system")
@ -692,6 +700,10 @@ _restic_dump()
flags_with_completion=()
flags_completion=()
flags+=("--archive=")
two_word_flags+=("--archive")
two_word_flags+=("-a")
local_nonpersistent_flags+=("--archive=")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
@ -901,6 +913,14 @@ _restic_forget()
local_nonpersistent_flags+=("--dry-run")
flags+=("--prune")
local_nonpersistent_flags+=("--prune")
flags+=("--max-unused=")
two_word_flags+=("--max-unused")
local_nonpersistent_flags+=("--max-unused=")
flags+=("--max-repack-size=")
two_word_flags+=("--max-repack-size")
local_nonpersistent_flags+=("--max-repack-size=")
flags+=("--repack-cacheable-only")
local_nonpersistent_flags+=("--repack-cacheable-only")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
@ -1418,9 +1438,20 @@ _restic_prune()
flags_with_completion=()
flags_completion=()
flags+=("--dry-run")
flags+=("-n")
local_nonpersistent_flags+=("--dry-run")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--max-repack-size=")
two_word_flags+=("--max-repack-size")
local_nonpersistent_flags+=("--max-repack-size=")
flags+=("--max-unused=")
two_word_flags+=("--max-unused")
local_nonpersistent_flags+=("--max-unused=")
flags+=("--repack-cacheable-only")
local_nonpersistent_flags+=("--repack-cacheable-only")
flags+=("--cacert=")
two_word_flags+=("--cacert")
flags+=("--cache-dir=")
@ -1477,6 +1508,8 @@ _restic_rebuild-index()
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--read-all-packs")
local_nonpersistent_flags+=("--read-all-packs")
flags+=("--cacert=")
two_word_flags+=("--cacert")
flags+=("--cache-dir=")

View File

@ -50,7 +50,15 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea
.PP
\fB\-\-files\-from\fP=[]
read the files to backup from \fB\fCfile\fR (can be combined with file args/can be specified multiple times)
read the files to backup from \fB\fCfile\fR (can be combined with file args; can be specified multiple times)
.PP
\fB\-\-files\-from\-raw\fP=[]
read the files to backup from \fB\fCfile\fR (can be combined with file args; can be specified multiple times)
.PP
\fB\-\-files\-from\-verbatim\fP=[]
read the files to backup from \fB\fCfile\fR (can be combined with file args; can be specified multiple times)
.PP
\fB\-f\fP, \fB\-\-force\fP[=false]
@ -72,6 +80,10 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea
\fB\-\-iexclude\-file\fP=[]
same as \-\-exclude\-file but ignores casing of \fB\fCfile\fRnames in patterns
.PP
\fB\-\-ignore\-ctime\fP[=false]
ignore ctime changes when checking for modified files
.PP
\fB\-\-ignore\-inode\fP[=false]
ignore inode number changes when checking for modified files
@ -94,7 +106,7 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea
.PP
\fB\-\-tag\fP=[]
add a \fB\fCtag\fR for the new snapshot (can be specified multiple times)
add \fB\fCtags\fR for the new snapshot in the format \fB\fCtag[,tag,...]\fR (can be specified multiple times)
.PP
\fB\-\-time\fP=""

View File

@ -43,7 +43,7 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
.PP
\fB\-\-read\-data\-subset\fP=""
read subset n of m data packs (format: \fB\fCn/m\fR)
read a \fB\fCsubset\fR of data packs, specified as 'n/t' for specific subset or either 'x%' or 'x.y%' for random subset
.PP
\fB\-\-with\-cache\fP[=false]

View File

@ -15,12 +15,21 @@ restic\-copy \- Copy snapshots from one repository to another
.SH DESCRIPTION
.PP
The "copy" command copies one or more snapshots from one repository to another
repository. Note that this will have to read (download) and write (upload) the
entire snapshot(s) due to the different encryption keys on the source and
destination, and that transferred files are not re\-chunked, which may break
their deduplication. This can be mitigated by the "\-\-copy\-chunker\-params"
option when initializing a new destination repository using the "init" command.
The "copy" command copies one or more snapshots from one repository to another.
.PP
NOTE: This process will have to both download (read) and upload (write) the
entire snapshot(s) due to the different encryption keys used in the source and
destination repositories. This /may incur higher bandwidth usage and costs/ than
expected during normal backup runs.
.PP
NOTE: The copying process does not re\-chunk files, which may break deduplication
between the files copied and files already stored in the destination repository.
This means that copied files, which existed in both the source and destination
repository, /may occupy up to twice their space/ in the destination repository.
This can be mitigated by the "\-\-copy\-chunker\-params" option when initializing a
new destination repository using the "init" command.
.SH OPTIONS

View File

@ -17,8 +17,8 @@ restic\-dump \- Print a backed\-up file to stdout
.PP
The "dump" command extracts files from a snapshot from the repository. If a
single file is selected, it prints its contents to stdout. Folders are output
as a tar file containing the contents of the specified folder. Pass "/" as
file name to dump the whole snapshot as a tar file.
as a tar (default) or zip file containing the contents of the specified folder.
Pass "/" as file name to dump the whole snapshot as an archive file.
.PP
The special snapshot "latest" can be used to use the latest snapshot in the
@ -31,6 +31,10 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
.SH OPTIONS
.PP
\fB\-a\fP, \fB\-\-archive\fP="tar"
set archive \fB\fCformat\fR as "tar" or "zip"
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for dump

View File

@ -87,6 +87,18 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
\fB\-\-prune\fP[=false]
automatically run the 'prune' command if snapshots have been removed
.PP
\fB\-\-max\-unused\fP="5%"
tolerate given \fB\fClimit\fR of unused data (absolute value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the word 'unlimited')
.PP
\fB\-\-max\-repack\-size\fP=""
maximum \fB\fCsize\fR to repack (allowed suffixes: k/K, m/M, g/G, t/T)
.PP
\fB\-\-repack\-cacheable\-only\fP[=false]
only repack packs which are cacheable
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for forget

View File

@ -25,10 +25,26 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
.SH OPTIONS
.PP
\fB\-n\fP, \fB\-\-dry\-run\fP[=false]
do not modify the repository, just print what would be done
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for prune
.PP
\fB\-\-max\-repack\-size\fP=""
maximum \fB\fCsize\fR to repack (allowed suffixes: k/K, m/M, g/G, t/T)
.PP
\fB\-\-max\-unused\fP="5%"
tolerate given \fB\fClimit\fR of unused data (absolute value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the word 'unlimited')
.PP
\fB\-\-repack\-cacheable\-only\fP[=false]
only repack packs which are cacheable
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP

View File

@ -5,7 +5,7 @@
.SH NAME
.PP
restic\-rebuild\-index \- Build a new index file
restic\-rebuild\-index \- Build a new index
.SH SYNOPSIS
@ -29,6 +29,10 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
\fB\-h\fP, \fB\-\-help\fP[=false]
help for rebuild\-index
.PP
\fB\-\-read\-all\-packs\fP[=false]
read all pack files to generate new index from scratch
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP

View File

@ -50,7 +50,7 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
.PP
\fB\-\-tag\fP=[]
only consider snapshots which include this \fB\fCtaglist\fR (can be specified multiple times)
only consider snapshots which include this \fB\fCtaglist\fR in the format \fB\fCtag[,tag,...]\fR (can be specified multiple times)
.SH OPTIONS INHERITED FROM PARENT COMMANDS

View File

@ -33,7 +33,7 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
.SH OPTIONS
.PP
\fB\-\-add\fP=[]
\fB\fCtag\fR which will be added to the existing tags (can be given multiple times)
\fB\fCtags\fR which will be added to the existing tags in the format \fB\fCtag[,tag,...]\fR (can be given multiple times)
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
@ -49,11 +49,11 @@ Exit status is 0 if the command was successful, and non\-zero if there was any e
.PP
\fB\-\-remove\fP=[]
\fB\fCtag\fR which will be removed from the existing tags (can be given multiple times)
\fB\fCtags\fR which will be removed from the existing tags in the format \fB\fCtag[,tag,...]\fR (can be given multiple times)
.PP
\fB\-\-set\fP=[]
\fB\fCtag\fR which will replace the existing tags (can be given multiple times)
\fB\fCtags\fR which will replace the existing tags in the format \fB\fCtag[,tag,...]\fR (can be given multiple times)
.PP
\fB\-\-tag\fP=[]

View File

@ -47,7 +47,7 @@ function _restic {
"migrate:Apply migrations"
"mount:Mount the repository"
"prune:Remove unneeded data from the repository"
"rebuild-index:Build a new index file"
"rebuild-index:Build a new index"
"recover:Recover data from the repository"
"restore:Extract the data from a snapshot"
"self-update:Update the restic binary"
@ -153,18 +153,21 @@ function _restic_backup {
'*--exclude-file[read exclude patterns from a `file` (can be specified multiple times)]:' \
'*--exclude-if-present[takes `filename[:header]`, exclude contents of directories containing filename (except filename itself) if header of that file is as provided (can be specified multiple times)]:' \
'--exclude-larger-than[max `size` of the files to be backed up (allowed suffixes: k/K, m/M, g/G, t/T)]:' \
'*--files-from[read the files to backup from `file` (can be combined with file args/can be specified multiple times)]:' \
'*--files-from[read the files to backup from `file` (can be combined with file args; can be specified multiple times)]:' \
'*--files-from-raw[read the files to backup from `file` (can be combined with file args; can be specified multiple times)]:' \
'*--files-from-verbatim[read the files to backup from `file` (can be combined with file args; can be specified multiple times)]:' \
'(-f --force)'{-f,--force}'[force re-reading the target files/directories (overrides the "parent" flag)]' \
'(-h --help)'{-h,--help}'[help for backup]' \
'(-H --host)'{-H,--host}'[set the `hostname` for the snapshot manually. To prevent an expensive rescan use the "parent" flag]:' \
'*--iexclude[same as --exclude `pattern` but ignores the casing of filenames]:' \
'*--iexclude-file[same as --exclude-file but ignores casing of `file`names in patterns]:' \
'--ignore-ctime[ignore ctime changes when checking for modified files]' \
'--ignore-inode[ignore inode number changes when checking for modified files]' \
'(-x --one-file-system)'{-x,--one-file-system}'[exclude other file systems]' \
'--parent[use this parent `snapshot` (default: last snapshot in the repo that has the same target files/directories)]:' \
'--stdin[read backup from stdin]' \
'--stdin-filename[`filename` to use when reading from stdin]:' \
'*--tag[add a `tag` for the new snapshot (can be specified multiple times)]:' \
'--tag[add `tags` for the new snapshot in the format `tag[,tag,...]` (can be specified multiple times)]:' \
'--time[`time` of the backup (ex. '\''2012-11-01 22:08:41'\'') (default: now)]:' \
'--with-atime[store the atime for all files and directories]' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
@ -238,7 +241,7 @@ function _restic_check {
'--check-unused[find unused blobs]' \
'(-h --help)'{-h,--help}'[help for check]' \
'--read-data[read all data blobs]' \
'--read-data-subset[read subset n of m data packs (format: `n/m`)]:' \
'--read-data-subset[read a `subset` of data packs, specified as '\''n/t'\'' for specific subset or either '\''x%'\'' or '\''x.y%'\'' for random subset]:' \
'--with-cache[use the cache]' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
'--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \
@ -313,6 +316,7 @@ function _restic_diff {
function _restic_dump {
_arguments \
'(-a --archive)'{-a,--archive}'[set archive `format` as "tar" or "zip"]:' \
'(-h --help)'{-h,--help}'[help for dump]' \
'(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this host when the snapshot ID is "latest" (can be specified multiple times)]:' \
'*--path[only consider snapshots which include this (absolute) `path` for snapshot ID "latest"]:' \
@ -387,6 +391,9 @@ function _restic_forget {
'(-g --group-by)'{-g,--group-by}'[string for grouping snapshots by host,paths,tags]:' \
'(-n --dry-run)'{-n,--dry-run}'[do not delete anything, just print what would be done]' \
'--prune[automatically run the '\''prune'\'' command if snapshots have been removed]' \
'--max-unused[tolerate given `limit` of unused data (absolute value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the word '\''unlimited'\'')]:' \
'--max-repack-size[maximum `size` to repack (allowed suffixes: k/K, m/M, g/G, t/T)]:' \
'--repack-cacheable-only[only repack packs which are cacheable]' \
'(-h --help)'{-h,--help}'[help for forget]' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
'--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \
@ -608,7 +615,11 @@ function _restic_mount {
function _restic_prune {
_arguments \
'(-n --dry-run)'{-n,--dry-run}'[do not modify the repository, just print what would be done]' \
'(-h --help)'{-h,--help}'[help for prune]' \
'--max-repack-size[maximum `size` to repack (allowed suffixes: k/K, m/M, g/G, t/T)]:' \
'--max-unused[tolerate given `limit` of unused data (absolute value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the word '\''unlimited'\'')]:' \
'--repack-cacheable-only[only repack packs which are cacheable]' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
'--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \
'--cleanup-cache[auto remove old cache directories]' \
@ -631,6 +642,7 @@ function _restic_prune {
function _restic_rebuild-index {
_arguments \
'(-h --help)'{-h,--help}'[help for rebuild-index]' \
'--read-all-packs[read all pack files to generate new index from scratch]' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
'--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \
'--cleanup-cache[auto remove old cache directories]' \
@ -734,7 +746,7 @@ function _restic_snapshots {
'(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this `host` (can be specified multiple times)]:' \
'--last[only show the last snapshot for each host and path]' \
'*--path[only consider snapshots for this `path` (can be specified multiple times)]:' \
'--tag[only consider snapshots which include this `taglist` (can be specified multiple times)]:' \
'--tag[only consider snapshots which include this `taglist` in the format `tag[,tag,...]` (can be specified multiple times)]:' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
'--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \
'--cleanup-cache[auto remove old cache directories]' \
@ -782,12 +794,12 @@ function _restic_stats {
function _restic_tag {
_arguments \
'*--add[`tag` which will be added to the existing tags (can be given multiple times)]:' \
'--add[`tags` which will be added to the existing tags in the format `tag[,tag,...]` (can be given multiple times)]:' \
'(-h --help)'{-h,--help}'[help for tag]' \
'(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this `host`, when no snapshot ID is given (can be specified multiple times)]:' \
'*--path[only consider snapshots which include this (absolute) `path`, when no snapshot-ID is given]:' \
'*--remove[`tag` which will be removed from the existing tags (can be given multiple times)]:' \
'*--set[`tag` which will replace the existing tags (can be given multiple times)]:' \
'--remove[`tags` which will be removed from the existing tags in the format `tag[,tag,...]` (can be given multiple times)]:' \
'--set[`tags` which will replace the existing tags in the format `tag[,tag,...]` (can be given multiple times)]:' \
'--tag[only consider snapshots which include this `taglist`, when no snapshot-ID is given]:' \
'*--cacert[`file` to load root certificates from (default: use system certificates)]:' \
'--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \