Update manpages and auto-completion

This commit is contained in:
Alexander Neumann 2018-10-13 13:48:30 +02:00
parent 0f5fc8fb3d
commit 9484a14ab2
27 changed files with 255 additions and 55 deletions

View file

@ -274,8 +274,8 @@ _restic_backup()
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--hostname=")
local_nonpersistent_flags+=("--hostname=")
flags+=("--host=")
local_nonpersistent_flags+=("--host=")
flags+=("--one-file-system")
flags+=("-x")
local_nonpersistent_flags+=("--one-file-system")
@ -337,6 +337,8 @@ _restic_cache()
local_nonpersistent_flags+=("--help")
flags+=("--max-age=")
local_nonpersistent_flags+=("--max-age=")
flags+=("--no-size")
local_nonpersistent_flags+=("--no-size")
flags+=("--cacert=")
flags+=("--cache-dir=")
flags+=("--cleanup-cache")
@ -561,6 +563,8 @@ _restic_find()
flags_with_completion=()
flags_completion=()
flags+=("--blob")
local_nonpersistent_flags+=("--blob")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
@ -579,13 +583,19 @@ _restic_find()
flags+=("--oldest=")
two_word_flags+=("-O")
local_nonpersistent_flags+=("--oldest=")
flags+=("--pack")
local_nonpersistent_flags+=("--pack")
flags+=("--path=")
local_nonpersistent_flags+=("--path=")
flags+=("--show-pack-id")
local_nonpersistent_flags+=("--show-pack-id")
flags+=("--snapshot=")
two_word_flags+=("-s")
local_nonpersistent_flags+=("--snapshot=")
flags+=("--tag=")
local_nonpersistent_flags+=("--tag=")
flags+=("--tree")
local_nonpersistent_flags+=("--tree")
flags+=("--cacert=")
flags+=("--cache-dir=")
flags+=("--cleanup-cache")
@ -649,8 +659,6 @@ _restic_forget()
local_nonpersistent_flags+=("--keep-tag=")
flags+=("--host=")
local_nonpersistent_flags+=("--host=")
flags+=("--hostname=")
local_nonpersistent_flags+=("--hostname=")
flags+=("--tag=")
local_nonpersistent_flags+=("--tag=")
flags+=("--path=")
@ -895,6 +903,8 @@ _restic_ls()
local_nonpersistent_flags+=("--long")
flags+=("--path=")
local_nonpersistent_flags+=("--path=")
flags+=("--recursive")
local_nonpersistent_flags+=("--recursive")
flags+=("--tag=")
local_nonpersistent_flags+=("--tag=")
flags+=("--cacert=")
@ -1168,6 +1178,50 @@ _restic_restore()
noun_aliases=()
}
_restic_self-update()
{
last_command="restic_self-update"
command_aliases=()
commands=()
flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--output=")
local_nonpersistent_flags+=("--output=")
flags+=("--cacert=")
flags+=("--cache-dir=")
flags+=("--cleanup-cache")
flags+=("--json")
flags+=("--limit-download=")
flags+=("--limit-upload=")
flags+=("--no-cache")
flags+=("--no-lock")
flags+=("--option=")
two_word_flags+=("-o")
flags+=("--password-file=")
two_word_flags+=("-p")
flags+=("--quiet")
flags+=("-q")
flags+=("--repo=")
two_word_flags+=("-r")
flags+=("--tls-client-cert=")
flags+=("--verbose")
flags+=("-v")
must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}
_restic_snapshots()
{
last_command="restic_snapshots"
@ -1434,6 +1488,7 @@ _restic_root_command()
commands+=("prune")
commands+=("rebuild-index")
commands+=("restore")
commands+=("self-update")
commands+=("snapshots")
commands+=("stats")
commands+=("tag")

View file

@ -49,7 +49,7 @@ given as the arguments.
help for backup
.PP
\fB\-\-hostname\fP=""
\fB\-\-host\fP="H"
set the \fB\fChostname\fR for the snapshot manually. To prevent an expensive rescan use the "parent" flag
.PP
@ -88,7 +88,7 @@ given as the arguments.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -31,6 +31,10 @@ The "cache" command allows listing and cleaning local cache directories.
\fB\-\-max\-age\fP=30
max age in \fB\fCdays\fR for cache directories to be considered old
.PP
\fB\-\-no\-size\fP[=false]
do not output the size of the cache directories
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
@ -39,7 +43,7 @@ The "cache" command allows listing and cleaning local cache directories.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -31,7 +31,7 @@ The "cat" command is used to print internal objects to stdout.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -52,7 +52,7 @@ repository and not use a local cache.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -21,11 +21,14 @@ directory:
.RS
.IP \(bu 2
The item was added
+ The item was added
.IP \(bu 2
\- The item was removed
.IP \(bu 2
The item was removed
U The metadata (access mode, timestamps, ...) for the item was updated
.IP \(bu 2
M The file's content was modified
.IP \(bu 2
T The type was changed, e.g. a file was made a symlink
.RE
@ -48,7 +51,7 @@ T The type was changed, e.g. a file was made a symlink
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -48,7 +48,7 @@ repository.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -5,21 +5,26 @@
.SH NAME
.PP
restic\-find \- Find a file or directory
restic\-find \- Find a file, a directory or restic IDs
.SH SYNOPSIS
.PP
\fBrestic find [flags] PATTERN\fP
\fBrestic find [flags] PATTERN...\fP
.SH DESCRIPTION
.PP
The "find" command searches for files or directories in snapshots stored in the
repo.
It can also be used to search for restic blobs or trees for troubleshooting.
.SH OPTIONS
.PP
\fB\-\-blob\fP[=false]
pattern is a blob\-ID
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for find
@ -44,10 +49,18 @@ repo.
\fB\-O\fP, \fB\-\-oldest\fP=""
oldest modification date/time
.PP
\fB\-\-pack\fP[=false]
pattern is a pack\-ID
.PP
\fB\-\-path\fP=[]
only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot\-ID is given
.PP
\fB\-\-show\-pack\-id\fP[=false]
display the pack\-ID the blobs belong to (with \-\-blob)
.PP
\fB\-s\fP, \fB\-\-snapshot\fP=[]
snapshot \fB\fCid\fR to search in (can be given multiple times)
@ -56,6 +69,10 @@ repo.
\fB\-\-tag\fP=[]
only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot\-ID is given
.PP
\fB\-\-tree\fP[=false]
pattern is a tree\-ID
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
@ -64,7 +81,7 @@ repo.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]
@ -115,6 +132,22 @@ repo.
be verbose (specify \-\-verbose multiple times or level \fB\fCn\fR)
.SH EXAMPLE
.PP
.RS
.nf
restic find config.json
restic find \-\-json "*.yml" "*.json"
restic find \-\-json \-\-blob 420f620f b46ebe8a ddd38656
restic find \-\-show\-pack\-id \-\-blob 420f620f
restic find \-\-tree 577c2bc9 f81f2e22 a62827a9
restic find \-\-pack 025c1d06
.fi
.RE
.SH SEE ALSO
.PP
\fBrestic(1)\fP

View file

@ -58,10 +58,6 @@ data after 'forget' was run successfully, see the 'prune' command.
\fB\-\-host\fP=""
only consider snapshots with the given \fB\fChost\fR
.PP
\fB\-\-hostname\fP=""
only consider snapshots with the given \fB\fChostname\fR (deprecated)
.PP
\fB\-\-tag\fP=[]
only consider snapshots which include this \fB\fCtaglist\fR in the format \fB\fCtag[,tag,...]\fR (can be specified multiple times)
@ -98,7 +94,7 @@ data after 'forget' was run successfully, see the 'prune' command.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -44,7 +44,7 @@ and the auto\-completion files for bash and zsh).
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -31,7 +31,7 @@ The "init" command initializes a new repository.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -35,7 +35,7 @@ The "key" command manages keys (passwords) for accessing the repository.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -31,7 +31,7 @@ The "list" command allows listing objects in the repository based on type.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -10,15 +10,27 @@ restic\-ls \- List files in a snapshot
.SH SYNOPSIS
.PP
\fBrestic ls [flags] [snapshot\-ID ...]\fP
\fBrestic ls [flags] [snapshotID] [dir...]\fP
.SH DESCRIPTION
.PP
The "ls" command allows listing files and directories in a snapshot.
The "ls" command lists files and directories in a snapshot.
.PP
The special snapshot\-ID "latest" can be used to list files and directories of the latest snapshot in the repository.
The special snapshot ID "latest" can be used to list files and
directories of the latest snapshot in the repository. The
\-\-host flag can be used in conjunction to select the latest
snapshot originating from a certain host only.
.PP
File listings can optionally be filtered by directories. Any
positional arguments after the snapshot ID are interpreted as
absolute directory paths, and only files inside those directories
will be listed. If the \-\-recursive flag is used, then the filter
will allow traversing into matching directories' subfolders.
Any directory paths specified must be absolute (starting with
a path separator); paths use the forward slash '/' as separator.
.SH OPTIONS
@ -38,6 +50,10 @@ The special snapshot\-ID "latest" can be used to list files and directories of t
\fB\-\-path\fP=[]
only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot ID is given
.PP
\fB\-\-recursive\fP[=false]
include files in subfolders of the listed directories
.PP
\fB\-\-tag\fP=[]
only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot ID is given
@ -50,7 +66,7 @@ The special snapshot\-ID "latest" can be used to list files and directories of t
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -36,7 +36,7 @@ name is explicitly given, a list of migrations that can be applied is printed.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -92,7 +92,7 @@ For details please see the documentation for time.Format() at:
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -32,7 +32,7 @@ referenced and therefore not needed any more.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -32,7 +32,7 @@ repository.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -64,7 +64,7 @@ repository.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -0,0 +1,94 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l
.SH NAME
.PP
restic\-self\-update \- Update the restic binary
.SH SYNOPSIS
.PP
\fBrestic self\-update [flags]\fP
.SH DESCRIPTION
.PP
The command "update\-restic" downloads the latest stable release of restic from
GitHub and replaces the currently running binary. After download, the
authenticity of the binary is verified using the GPG signature on the release
files.
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for self\-update
.PP
\fB\-\-output\fP="./restic\-generate.temp"
Save the downloaded file as \fB\fCfilename\fR
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-cacert\fP=[]
\fB\fCfile\fR to load root certificates from (default: use system certificates)
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]
auto remove old cache directories
.PP
\fB\-\-json\fP[=false]
set output mode to JSON for commands that support it
.PP
\fB\-\-limit\-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
.PP
\fB\-\-limit\-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
.PP
\fB\-\-no\-cache\fP[=false]
do not use a local cache
.PP
\fB\-\-no\-lock\fP[=false]
do not lock the repo, this allows some operations on read\-only repos
.PP
\fB\-o\fP, \fB\-\-option\fP=[]
set extended option (\fB\fCkey=value\fR, can be specified multiple times)
.PP
\fB\-p\fP, \fB\-\-password\-file\fP=""
read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE)
.PP
\fB\-q\fP, \fB\-\-quiet\fP[=false]
do not output comprehensive progress report
.PP
\fB\-r\fP, \fB\-\-repo\fP=""
repository to backup to or restore from (default: $RESTIC\_REPOSITORY)
.PP
\fB\-\-tls\-client\-cert\fP=""
path to a file containing PEM encoded TLS client certificate and private key
.PP
\fB\-v\fP, \fB\-\-verbose\fP[=0]
be verbose (specify \-\-verbose multiple times or level \fB\fCn\fR)
.SH SEE ALSO
.PP
\fBrestic(1)\fP

View file

@ -51,7 +51,7 @@ The "snapshots" command lists all snapshots stored in the repository.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -29,23 +29,22 @@ to calculate.
.PP
The modes are:
.PP
.RS
.IP \(bu 2
restore\-size: (default) Counts the size of the restored files.
.PP
.IP \(bu 2
files\-by\-contents: Counts total size of files, where a file is
considered unique if it has unique contents.
.PP
raw\-data: Counts the size of blobs in the repository, regardless
of how many files reference them.
.PP
considered unique if it has unique contents.
.IP \(bu 2
raw\-data: Counts the size of blobs in the repository, regardless of
how many files reference them.
.IP \(bu 2
blobs\-per\-file: A combination of files\-by\-contents and raw\-data.
.PP
.IP \(bu 2
Refer to the online manual for more details about each mode.
.RE
.SH OPTIONS
.PP
@ -53,7 +52,7 @@ Refer to the online manual for more details about each mode.
help for stats
.PP
\fB\-\-host\fP=""
\fB\-\-host\fP="H"
filter latest snapshot by this hostname
.PP
@ -68,7 +67,7 @@ Refer to the online manual for more details about each mode.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -62,7 +62,7 @@ When no snapshot\-ID is given, all snapshots matching the host, tag and path fil
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -35,7 +35,7 @@ The "unlock" command removes stale locks that have been created by other restic
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -32,7 +32,7 @@ and the version of this software.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]

View file

@ -26,7 +26,7 @@ directories in an encrypted repository stored on different backends.
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
set the cache directory. (default: use system default cache directory)
.PP
\fB\-\-cleanup\-cache\fP[=false]
@ -83,4 +83,4 @@ directories in an encrypted repository stored on different backends.
.SH SEE ALSO
.PP
\fBrestic\-backup(1)\fP, \fBrestic\-cache(1)\fP, \fBrestic\-cat(1)\fP, \fBrestic\-check(1)\fP, \fBrestic\-diff(1)\fP, \fBrestic\-dump(1)\fP, \fBrestic\-find(1)\fP, \fBrestic\-forget(1)\fP, \fBrestic\-generate(1)\fP, \fBrestic\-init(1)\fP, \fBrestic\-key(1)\fP, \fBrestic\-list(1)\fP, \fBrestic\-ls(1)\fP, \fBrestic\-migrate(1)\fP, \fBrestic\-mount(1)\fP, \fBrestic\-prune(1)\fP, \fBrestic\-rebuild\-index(1)\fP, \fBrestic\-restore(1)\fP, \fBrestic\-snapshots(1)\fP, \fBrestic\-stats(1)\fP, \fBrestic\-tag(1)\fP, \fBrestic\-unlock(1)\fP, \fBrestic\-version(1)\fP
\fBrestic\-backup(1)\fP, \fBrestic\-cache(1)\fP, \fBrestic\-cat(1)\fP, \fBrestic\-check(1)\fP, \fBrestic\-diff(1)\fP, \fBrestic\-dump(1)\fP, \fBrestic\-find(1)\fP, \fBrestic\-forget(1)\fP, \fBrestic\-generate(1)\fP, \fBrestic\-init(1)\fP, \fBrestic\-key(1)\fP, \fBrestic\-list(1)\fP, \fBrestic\-ls(1)\fP, \fBrestic\-migrate(1)\fP, \fBrestic\-mount(1)\fP, \fBrestic\-prune(1)\fP, \fBrestic\-rebuild\-index(1)\fP, \fBrestic\-restore(1)\fP, \fBrestic\-self\-update(1)\fP, \fBrestic\-snapshots(1)\fP, \fBrestic\-stats(1)\fP, \fBrestic\-tag(1)\fP, \fBrestic\-unlock(1)\fP, \fBrestic\-version(1)\fP

View file

@ -7,7 +7,7 @@ case $state in
level1)
case $words[1] in
restic)
_arguments '1: :(backup cache cat check diff dump find forget generate help init key list ls migrate mount options prune rebuild-index restore snapshots stats tag unlock version)'
_arguments '1: :(backup cache cat check diff dump find forget generate help init key list ls migrate mount options prune rebuild-index restore self-update snapshots stats tag unlock version)'
;;
*)
_arguments '*: :_files'