diff --git a/doc/bash-completion.sh b/doc/bash-completion.sh index 7e0074c3b..112b31bd6 100644 --- a/doc/bash-completion.sh +++ b/doc/bash-completion.sh @@ -36,9 +36,71 @@ __restic_contains_word() return 1 } +__restic_handle_go_custom_completion() +{ + __restic_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}" + + local out requestComp lastParam lastChar comp directive args + + # Prepare the command to request completions for the program. + # Calling ${words[0]} instead of directly restic allows to handle aliases + args=("${words[@]:1}") + requestComp="${words[0]} __completeNoDesc ${args[*]}" + + lastParam=${words[$((${#words[@]}-1))]} + lastChar=${lastParam:$((${#lastParam}-1)):1} + __restic_debug "${FUNCNAME[0]}: lastParam ${lastParam}, lastChar ${lastChar}" + + if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go method. + __restic_debug "${FUNCNAME[0]}: Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __restic_debug "${FUNCNAME[0]}: calling ${requestComp}" + # Use eval to handle any environment variables and such + out=$(eval "${requestComp}" 2>/dev/null) + + # Extract the directive integer at the very end of the output following a colon (:) + directive=${out##*:} + # Remove the directive + out=${out%:*} + if [ "${directive}" = "${out}" ]; then + # There is not directive specified + directive=0 + fi + __restic_debug "${FUNCNAME[0]}: the completion directive is: ${directive}" + __restic_debug "${FUNCNAME[0]}: the completions are: ${out[*]}" + + if [ $((directive & 1)) -ne 0 ]; then + # Error code. No completion. + __restic_debug "${FUNCNAME[0]}: received error from custom completion go code" + return + else + if [ $((directive & 2)) -ne 0 ]; then + if [[ $(type -t compopt) = "builtin" ]]; then + __restic_debug "${FUNCNAME[0]}: activating no space" + compopt -o nospace + fi + fi + if [ $((directive & 4)) -ne 0 ]; then + if [[ $(type -t compopt) = "builtin" ]]; then + __restic_debug "${FUNCNAME[0]}: activating no file completion" + compopt +o default + fi + fi + + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${out[*]}" -- "$cur") + fi +} + __restic_handle_reply() { __restic_debug "${FUNCNAME[0]}" + local comp case $cur in -*) if [[ $(type -t compopt) = "builtin" ]]; then @@ -50,7 +112,9 @@ __restic_handle_reply() else allflags=("${flags[*]} ${two_word_flags[*]}") fi - COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${allflags[*]}" -- "$cur") if [[ $(type -t compopt) = "builtin" ]]; then [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace fi @@ -96,18 +160,32 @@ __restic_handle_reply() completions=("${commands[@]}") if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then completions=("${must_have_one_noun[@]}") + elif [[ -n "${has_completion_function}" ]]; then + # if a go completion function is provided, defer to that function + completions=() + __restic_handle_go_custom_completion fi if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then completions+=("${must_have_one_flag[@]}") fi - COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${completions[*]}" -- "$cur") if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then - COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") ) + while IFS='' read -r comp; do + COMPREPLY+=("$comp") + done < <(compgen -W "${noun_aliases[*]}" -- "$cur") fi if [[ ${#COMPREPLY[@]} -eq 0 ]]; then - declare -F __custom_func >/dev/null && __custom_func + if declare -F __restic_custom_func >/dev/null; then + # try command name qualified custom func + __restic_custom_func + else + # otherwise fall back to unqualified for compatibility + declare -F __custom_func >/dev/null && __custom_func + fi fi # available in bash-completion >= 2, not always present on macOS @@ -132,7 +210,7 @@ __restic_handle_filename_extension_flag() __restic_handle_subdirs_in_dir_flag() { local dir="$1" - pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 + pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return } __restic_handle_flag() @@ -171,7 +249,8 @@ __restic_handle_flag() fi # skip the argument to a two word flag - if __restic_contains_word "${words[c]}" "${two_word_flags[@]}"; then + if [[ ${words[c]} != *"="* ]] && __restic_contains_word "${words[c]}" "${two_word_flags[@]}"; then + __restic_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument" c=$((c+1)) # if we are looking for a flags value, don't show commands if [[ $c -eq $cword ]]; then @@ -258,15 +337,22 @@ _restic_backup() flags_completion=() flags+=("--exclude=") + two_word_flags+=("--exclude") two_word_flags+=("-e") local_nonpersistent_flags+=("--exclude=") flags+=("--exclude-caches") local_nonpersistent_flags+=("--exclude-caches") flags+=("--exclude-file=") + two_word_flags+=("--exclude-file") local_nonpersistent_flags+=("--exclude-file=") flags+=("--exclude-if-present=") + two_word_flags+=("--exclude-if-present") local_nonpersistent_flags+=("--exclude-if-present=") + flags+=("--exclude-larger-than=") + two_word_flags+=("--exclude-larger-than") + local_nonpersistent_flags+=("--exclude-larger-than=") flags+=("--files-from=") + two_word_flags+=("--files-from") local_nonpersistent_flags+=("--files-from=") flags+=("--force") flags+=("-f") @@ -275,46 +361,65 @@ _restic_backup() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--iexclude=") + two_word_flags+=("--iexclude") local_nonpersistent_flags+=("--iexclude=") + flags+=("--iexclude-file=") + two_word_flags+=("--iexclude-file") + local_nonpersistent_flags+=("--iexclude-file=") flags+=("--ignore-inode") local_nonpersistent_flags+=("--ignore-inode") flags+=("--one-file-system") flags+=("-x") local_nonpersistent_flags+=("--one-file-system") flags+=("--parent=") + two_word_flags+=("--parent") local_nonpersistent_flags+=("--parent=") flags+=("--stdin") local_nonpersistent_flags+=("--stdin") flags+=("--stdin-filename=") + two_word_flags+=("--stdin-filename") local_nonpersistent_flags+=("--stdin-filename=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--time=") + two_word_flags+=("--time") local_nonpersistent_flags+=("--time=") flags+=("--with-atime") local_nonpersistent_flags+=("--with-atime") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -343,28 +448,39 @@ _restic_cache() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--max-age=") + two_word_flags+=("--max-age") local_nonpersistent_flags+=("--max-age=") flags+=("--no-size") local_nonpersistent_flags+=("--no-size") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -391,24 +507,34 @@ _restic_cat() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -439,28 +565,115 @@ _restic_check() flags+=("--read-data") local_nonpersistent_flags+=("--read-data") flags+=("--read-data-subset=") + two_word_flags+=("--read-data-subset") local_nonpersistent_flags+=("--read-data-subset=") flags+=("--with-cache") local_nonpersistent_flags+=("--with-cache") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") + flags+=("--verbose") + flags+=("-v") + + must_have_one_flag=() + must_have_one_noun=() + noun_aliases=() +} + +_restic_copy() +{ + last_command="restic_copy" + + command_aliases=() + + commands=() + + flags=() + two_word_flags=() + local_nonpersistent_flags=() + flags_with_completion=() + flags_completion=() + + flags+=("--help") + flags+=("-h") + local_nonpersistent_flags+=("--help") + flags+=("--host=") + two_word_flags+=("--host") + two_word_flags+=("-H") + local_nonpersistent_flags+=("--host=") + flags+=("--key-hint2=") + two_word_flags+=("--key-hint2") + local_nonpersistent_flags+=("--key-hint2=") + flags+=("--password-command2=") + two_word_flags+=("--password-command2") + local_nonpersistent_flags+=("--password-command2=") + flags+=("--password-file2=") + two_word_flags+=("--password-file2") + local_nonpersistent_flags+=("--password-file2=") + flags+=("--path=") + two_word_flags+=("--path") + local_nonpersistent_flags+=("--path=") + flags+=("--repo2=") + two_word_flags+=("--repo2") + local_nonpersistent_flags+=("--repo2=") + flags+=("--tag=") + two_word_flags+=("--tag") + local_nonpersistent_flags+=("--tag=") + flags+=("--cacert=") + two_word_flags+=("--cacert") + flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") + flags+=("--cleanup-cache") + flags+=("--json") + flags+=("--key-hint=") + two_word_flags+=("--key-hint") + flags+=("--limit-download=") + two_word_flags+=("--limit-download") + flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") + flags+=("--no-cache") + flags+=("--no-lock") + flags+=("--option=") + two_word_flags+=("--option") + two_word_flags+=("-o") + flags+=("--password-command=") + two_word_flags+=("--password-command") + flags+=("--password-file=") + two_word_flags+=("--password-file") + two_word_flags+=("-p") + flags+=("--quiet") + flags+=("-q") + flags+=("--repo=") + two_word_flags+=("--repo") + two_word_flags+=("-r") + flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -489,24 +702,34 @@ _restic_diff() flags+=("--metadata") local_nonpersistent_flags+=("--metadata") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -533,31 +756,44 @@ _restic_dump() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -586,6 +822,7 @@ _restic_find() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--ignore-case") @@ -595,43 +832,58 @@ _restic_find() flags+=("-l") local_nonpersistent_flags+=("--long") flags+=("--newest=") + two_word_flags+=("--newest") two_word_flags+=("-N") local_nonpersistent_flags+=("--newest=") flags+=("--oldest=") + two_word_flags+=("--oldest") two_word_flags+=("-O") local_nonpersistent_flags+=("--oldest=") flags+=("--pack") local_nonpersistent_flags+=("--pack") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--show-pack-id") local_nonpersistent_flags+=("--show-pack-id") flags+=("--snapshot=") + two_word_flags+=("--snapshot") two_word_flags+=("-s") local_nonpersistent_flags+=("--snapshot=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--tree") local_nonpersistent_flags+=("--tree") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -655,37 +907,49 @@ _restic_forget() flags_completion=() flags+=("--keep-last=") + two_word_flags+=("--keep-last") two_word_flags+=("-l") local_nonpersistent_flags+=("--keep-last=") flags+=("--keep-hourly=") + two_word_flags+=("--keep-hourly") two_word_flags+=("-H") local_nonpersistent_flags+=("--keep-hourly=") flags+=("--keep-daily=") + two_word_flags+=("--keep-daily") two_word_flags+=("-d") local_nonpersistent_flags+=("--keep-daily=") flags+=("--keep-weekly=") + two_word_flags+=("--keep-weekly") two_word_flags+=("-w") local_nonpersistent_flags+=("--keep-weekly=") flags+=("--keep-monthly=") + two_word_flags+=("--keep-monthly") two_word_flags+=("-m") local_nonpersistent_flags+=("--keep-monthly=") flags+=("--keep-yearly=") + two_word_flags+=("--keep-yearly") two_word_flags+=("-y") local_nonpersistent_flags+=("--keep-yearly=") flags+=("--keep-within=") + two_word_flags+=("--keep-within") local_nonpersistent_flags+=("--keep-within=") flags+=("--keep-tag=") + two_word_flags+=("--keep-tag") local_nonpersistent_flags+=("--keep-tag=") flags+=("--host=") + two_word_flags+=("--host") local_nonpersistent_flags+=("--host=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--compact") flags+=("-c") local_nonpersistent_flags+=("--compact") flags+=("--group-by=") + two_word_flags+=("--group-by") two_word_flags+=("-g") local_nonpersistent_flags+=("--group-by=") flags+=("--dry-run") @@ -697,24 +961,34 @@ _restic_forget() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -738,33 +1012,46 @@ _restic_generate() flags_completion=() flags+=("--bash-completion=") + two_word_flags+=("--bash-completion") local_nonpersistent_flags+=("--bash-completion=") flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--man=") + two_word_flags+=("--man") local_nonpersistent_flags+=("--man=") flags+=("--zsh-completion=") + two_word_flags+=("--zsh-completion") local_nonpersistent_flags+=("--zsh-completion=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -787,28 +1074,52 @@ _restic_init() flags_with_completion=() flags_completion=() + flags+=("--copy-chunker-params") + local_nonpersistent_flags+=("--copy-chunker-params") flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") + flags+=("--key-hint2=") + two_word_flags+=("--key-hint2") + local_nonpersistent_flags+=("--key-hint2=") + flags+=("--password-command2=") + two_word_flags+=("--password-command2") + local_nonpersistent_flags+=("--password-command2=") + flags+=("--password-file2=") + two_word_flags+=("--password-file2") + local_nonpersistent_flags+=("--password-file2=") + flags+=("--repo2=") + two_word_flags+=("--repo2") + local_nonpersistent_flags+=("--repo2=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -834,27 +1145,44 @@ _restic_key() flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") + flags+=("--host=") + two_word_flags+=("--host") + local_nonpersistent_flags+=("--host=") flags+=("--new-password-file=") + two_word_flags+=("--new-password-file") local_nonpersistent_flags+=("--new-password-file=") + flags+=("--user=") + two_word_flags+=("--user") + local_nonpersistent_flags+=("--user=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -881,24 +1209,34 @@ _restic_list() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -925,36 +1263,49 @@ _restic_ls() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--long") flags+=("-l") local_nonpersistent_flags+=("--long") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--recursive") local_nonpersistent_flags+=("--recursive") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -984,24 +1335,34 @@ _restic_migrate() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1030,6 +1391,7 @@ _restic_mount() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--no-default-permissions") @@ -1037,30 +1399,43 @@ _restic_mount() flags+=("--owner-root") local_nonpersistent_flags+=("--owner-root") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--snapshot-template=") + two_word_flags+=("--snapshot-template") local_nonpersistent_flags+=("--snapshot-template=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1087,24 +1462,34 @@ _restic_prune() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1131,24 +1516,34 @@ _restic_rebuild-index() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1175,24 +1570,34 @@ _restic_recover() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1216,49 +1621,67 @@ _restic_restore() flags_completion=() flags+=("--exclude=") + two_word_flags+=("--exclude") two_word_flags+=("-e") local_nonpersistent_flags+=("--exclude=") flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--iexclude=") + two_word_flags+=("--iexclude") local_nonpersistent_flags+=("--iexclude=") flags+=("--iinclude=") + two_word_flags+=("--iinclude") local_nonpersistent_flags+=("--iinclude=") flags+=("--include=") + two_word_flags+=("--include") two_word_flags+=("-i") local_nonpersistent_flags+=("--include=") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--target=") + two_word_flags+=("--target") two_word_flags+=("-t") local_nonpersistent_flags+=("--target=") flags+=("--verify") local_nonpersistent_flags+=("--verify") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1285,26 +1708,37 @@ _restic_self-update() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--output=") + two_word_flags+=("--output") local_nonpersistent_flags+=("--output=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1331,39 +1765,53 @@ _restic_snapshots() flags+=("-c") local_nonpersistent_flags+=("--compact") flags+=("--group-by=") + two_word_flags+=("--group-by") two_word_flags+=("-g") local_nonpersistent_flags+=("--group-by=") flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--last") local_nonpersistent_flags+=("--last") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1390,29 +1838,47 @@ _restic_stats() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--mode=") + two_word_flags+=("--mode") local_nonpersistent_flags+=("--mode=") + flags+=("--path=") + two_word_flags+=("--path") + local_nonpersistent_flags+=("--path=") + flags+=("--tag=") + two_word_flags+=("--tag") + local_nonpersistent_flags+=("--tag=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1436,40 +1902,56 @@ _restic_tag() flags_completion=() flags+=("--add=") + two_word_flags+=("--add") local_nonpersistent_flags+=("--add=") flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--host=") + two_word_flags+=("--host") two_word_flags+=("-H") local_nonpersistent_flags+=("--host=") flags+=("--path=") + two_word_flags+=("--path") local_nonpersistent_flags+=("--path=") flags+=("--remove=") + two_word_flags+=("--remove") local_nonpersistent_flags+=("--remove=") flags+=("--set=") + two_word_flags+=("--set") local_nonpersistent_flags+=("--set=") flags+=("--tag=") + two_word_flags+=("--tag") local_nonpersistent_flags+=("--tag=") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1498,24 +1980,34 @@ _restic_unlock() flags+=("--remove-all") local_nonpersistent_flags+=("--remove-all") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1542,24 +2034,34 @@ _restic_version() flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1579,6 +2081,7 @@ _restic_root_command() commands+=("cache") commands+=("cat") commands+=("check") + commands+=("copy") commands+=("diff") commands+=("dump") commands+=("find") @@ -1608,27 +2111,37 @@ _restic_root_command() flags_completion=() flags+=("--cacert=") + two_word_flags+=("--cacert") flags+=("--cache-dir=") + two_word_flags+=("--cache-dir") flags+=("--cleanup-cache") flags+=("--help") flags+=("-h") local_nonpersistent_flags+=("--help") flags+=("--json") flags+=("--key-hint=") + two_word_flags+=("--key-hint") flags+=("--limit-download=") + two_word_flags+=("--limit-download") flags+=("--limit-upload=") + two_word_flags+=("--limit-upload") flags+=("--no-cache") flags+=("--no-lock") flags+=("--option=") + two_word_flags+=("--option") two_word_flags+=("-o") flags+=("--password-command=") + two_word_flags+=("--password-command") flags+=("--password-file=") + two_word_flags+=("--password-file") two_word_flags+=("-p") flags+=("--quiet") flags+=("-q") flags+=("--repo=") + two_word_flags+=("--repo") two_word_flags+=("-r") flags+=("--tls-client-cert=") + two_word_flags+=("--tls-client-cert") flags+=("--verbose") flags+=("-v") @@ -1657,6 +2170,7 @@ __start_restic() local commands=("restic") local must_have_one_flag=() local must_have_one_noun=() + local has_completion_function local last_command local nouns=() diff --git a/doc/man/restic-backup.1 b/doc/man/restic-backup.1 index 21ad66bc9..c6051099c 100644 --- a/doc/man/restic-backup.1 +++ b/doc/man/restic-backup.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -19,141 +18,155 @@ The "backup" command creates a new snapshot and saves the files and directories given as the arguments. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful. +Exit status is 1 if there was a fatal error (no snapshot created). +Exit status is 3 if some source data could not be read (incomplete snapshot created). + + .SH OPTIONS .PP \fB\-e\fP, \fB\-\-exclude\fP=[] - exclude a \fB\fCpattern\fR (can be specified multiple times) + exclude a \fB\fCpattern\fR (can be specified multiple times) .PP \fB\-\-exclude\-caches\fP[=false] - excludes cache directories that are marked with a CACHEDIR.TAG file. See -\[la]http://bford.info/cachedir/spec.html\[ra] for the Cache Directory Tagging Standard + excludes cache directories that are marked with a CACHEDIR.TAG file. See https://bford.info/cachedir/ for the Cache Directory Tagging Standard .PP \fB\-\-exclude\-file\fP=[] - read exclude patterns from a \fB\fCfile\fR (can be specified multiple times) + read exclude patterns from a \fB\fCfile\fR (can be specified multiple times) .PP \fB\-\-exclude\-if\-present\fP=[] - 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) + takes \fB\fCfilename[:header]\fR, exclude contents of directories containing filename (except filename itself) if header of that file is as provided (can be specified multiple times) + +.PP +\fB\-\-exclude\-larger\-than\fP="" + max \fB\fCsize\fR of the files to be backed up (allowed suffixes: k/K, m/M, g/G, t/T) .PP \fB\-\-files\-from\fP=[] - read the files to backup from file (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\-f\fP, \fB\-\-force\fP[=false] - force re\-reading the target files/directories (overrides the "parent" flag) + force re\-reading the target files/directories (overrides the "parent" flag) .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for backup + help for backup .PP \fB\-H\fP, \fB\-\-host\fP="" - set the \fB\fChostname\fR for the snapshot manually. To prevent an expensive rescan use the "parent" flag + set the \fB\fChostname\fR for the snapshot manually. To prevent an expensive rescan use the "parent" flag .PP \fB\-\-iexclude\fP=[] - same as \fB\fC\-\-exclude\fR but ignores the casing of filenames + same as \-\-exclude \fB\fCpattern\fR but ignores the casing of filenames + +.PP +\fB\-\-iexclude\-file\fP=[] + same as \-\-exclude\-file but ignores casing of \fB\fCfile\fRnames in patterns .PP \fB\-\-ignore\-inode\fP[=false] - ignore inode number changes when checking for modified files + ignore inode number changes when checking for modified files .PP \fB\-x\fP, \fB\-\-one\-file\-system\fP[=false] - exclude other file systems + exclude other file systems .PP \fB\-\-parent\fP="" - use this parent snapshot (default: last snapshot in the repo that has the same target files/directories) + use this parent \fB\fCsnapshot\fR (default: last snapshot in the repo that has the same target files/directories) .PP \fB\-\-stdin\fP[=false] - read backup from stdin + read backup from stdin .PP \fB\-\-stdin\-filename\fP="stdin" - file name to use when reading from stdin + \fB\fCfilename\fR to use when reading from stdin .PP \fB\-\-tag\fP=[] - add a \fB\fCtag\fR for the new snapshot (can be specified multiple times) + add a \fB\fCtag\fR for the new snapshot (can be specified multiple times) .PP \fB\-\-time\fP="" - time of the backup (ex. '2012\-11\-01 22:08:41') (default: now) + \fB\fCtime\fR of the backup (ex. '2012\-11\-01 22:08:41') (default: now) .PP \fB\-\-with\-atime\fP[=false] - store the atime for all files and directories + store the atime for all files and directories .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-cache.1 b/doc/man/restic-cache.1 index 007e88eb6..99feb8b1d 100644 --- a/doc/man/restic-cache.1 +++ b/doc/man/restic-cache.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -18,88 +17,93 @@ restic\-cache \- Operate on local cache directories The "cache" command allows listing and cleaning local cache directories. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-\-cleanup\fP[=false] - remove old cache directories + remove old cache directories .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for cache + help for cache .PP \fB\-\-max\-age\fP=30 - max age in \fB\fCdays\fR for cache directories to be considered old + 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 + do not output the size of the cache directories .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-cat.1 b/doc/man/restic-cat.1 index 7f586cb9a..08d26ee00 100644 --- a/doc/man/restic-cat.1 +++ b/doc/man/restic-cat.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -18,76 +17,81 @@ restic\-cat \- Print internal objects to stdout The "cat" command is used to print internal objects to stdout. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for cat + help for cat .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-check.1 b/doc/man/restic-check.1 index d5047306a..75d2193bd 100644 --- a/doc/man/restic-check.1 +++ b/doc/man/restic-check.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -23,92 +22,97 @@ By default, the "check" command will always load all data directly from the repository and not use a local cache. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-\-check\-unused\fP[=false] - find unused blobs + find unused blobs .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for check + help for check .PP \fB\-\-read\-data\fP[=false] - read all data blobs + read all data blobs .PP \fB\-\-read\-data\-subset\fP="" - read subset n of m data packs (format: \fB\fCn/m\fR) + read subset n of m data packs (format: \fB\fCn/m\fR) .PP \fB\-\-with\-cache\fP[=false] - use the cache + use the cache .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-copy.1 b/doc/man/restic-copy.1 new file mode 100644 index 000000000..a7e41fccb --- /dev/null +++ b/doc/man/restic-copy.1 @@ -0,0 +1,127 @@ +.nh +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR + +.SH NAME +.PP +restic\-copy \- Copy snapshots from one repository to another + + +.SH SYNOPSIS +.PP +\fBrestic copy [flags] [snapshotID ...]\fP + + +.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. + + +.SH OPTIONS +.PP +\fB\-h\fP, \fB\-\-help\fP[=false] + help for copy + +.PP +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given (can be specified multiple times) + +.PP +\fB\-\-key\-hint2\fP="" + key ID of key to try decrypting the destination repository first (default: $RESTIC\_KEY\_HINT2) + +.PP +\fB\-\-password\-command2\fP="" + shell \fB\fCcommand\fR to obtain the destination repository password from (default: $RESTIC\_PASSWORD\_COMMAND2) + +.PP +\fB\-\-password\-file2\fP="" + \fB\fCfile\fR to read the destination repository password from (default: $RESTIC\_PASSWORD\_FILE2) + +.PP +\fB\-\-path\fP=[] + only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot ID is given + +.PP +\fB\-\-repo2\fP="" + destination repository to copy snapshots to (default: $RESTIC\_REPOSITORY2) + +.PP +\fB\-\-tag\fP=[] + only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot ID is given + + +.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 \fB\fCdirectory\fR\&. (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\-\-key\-hint\fP="" + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + +.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\-\-password\-command\fP="" + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) + +.PP +\fB\-p\fP, \fB\-\-password\-file\fP="" + \fB\fCfile\fR to read the repository password from (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="" + \fB\fCrepository\fR to backup to or restore from (default: $RESTIC\_REPOSITORY) + +.PP +\fB\-\-tls\-client\-cert\fP="" + path to a \fB\fCfile\fR 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 \-\-verbose=\fB\fCn\fR) + + +.SH SEE ALSO +.PP +\fBrestic(1)\fP diff --git a/doc/man/restic-diff.1 b/doc/man/restic-diff.1 index 9bd147412..880aec32a 100644 --- a/doc/man/restic-diff.1 +++ b/doc/man/restic-diff.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-diff \- Show differences between two snapshots .SH SYNOPSIS .PP -\fBrestic diff snapshot\-ID snapshot\-ID [flags]\fP +\fBrestic diff [flags] snapshot\-ID snapshot\-ID\fP .SH DESCRIPTION @@ -34,80 +33,85 @@ T The type was changed, e.g. a file was made a symlink .RE +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for diff + help for diff .PP \fB\-\-metadata\fP[=false] - print changes in metadata + print changes in metadata .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-dump.1 b/doc/man/restic-dump.1 index fac6a06fc..2493fa8f6 100644 --- a/doc/man/restic-dump.1 +++ b/doc/man/restic-dump.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -15,96 +14,103 @@ restic\-dump \- Print a backed\-up file to stdout .SH DESCRIPTION .PP -The "dump" command extracts a single file from a snapshot from the repository and -prints its contents to stdout. +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. .PP The special snapshot "latest" can be used to use the latest snapshot in the repository. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for dump + help for dump .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this host when the snapshot ID is "latest" +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this host when the snapshot ID is "latest" (can be specified multiple times) .PP \fB\-\-path\fP=[] - only consider snapshots which include this (absolute) \fB\fCpath\fR for snapshot ID "latest" + only consider snapshots which include this (absolute) \fB\fCpath\fR for snapshot ID "latest" .PP \fB\-\-tag\fP=[] - only consider snapshots which include this \fB\fCtaglist\fR for snapshot ID "latest" + only consider snapshots which include this \fB\fCtaglist\fR for snapshot ID "latest" .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-find.1 b/doc/man/restic-find.1 index 0bcd3ac5d..a0205ba6f 100644 --- a/doc/man/restic-find.1 +++ b/doc/man/restic-find.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -23,121 +22,121 @@ 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 + pattern is a blob\-ID .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for find + help for find .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given (can be specified multiple times) .PP \fB\-i\fP, \fB\-\-ignore\-case\fP[=false] - ignore case for pattern + ignore case for pattern .PP \fB\-l\fP, \fB\-\-long\fP[=false] - use a long listing format showing size and mode + use a long listing format showing size and mode .PP \fB\-N\fP, \fB\-\-newest\fP="" - newest modification date/time + newest modification date/time .PP \fB\-O\fP, \fB\-\-oldest\fP="" - oldest modification date/time + oldest modification date/time .PP \fB\-\-pack\fP[=false] - pattern is a pack\-ID + 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 + 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 or \-\-tree) + display the pack\-ID the blobs belong to (with \-\-blob or \-\-tree) .PP \fB\-s\fP, \fB\-\-snapshot\fP=[] - snapshot \fB\fCid\fR to search in (can be given multiple times) + snapshot \fB\fCid\fR to search in (can be given multiple times) .PP \fB\-\-tag\fP=[] - only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot\-ID is given + 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 + pattern is a tree\-ID .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH EXAMPLE @@ -152,6 +151,12 @@ restic find \-\-show\-pack\-id \-\-blob 420f620f restic find \-\-tree 577c2bc9 f81f2e22 a62827a9 restic find \-\-pack 025c1d06 +EXIT STATUS +=========== + +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .fi .RE diff --git a/doc/man/restic-forget.1 b/doc/man/restic-forget.1 index 17e79f336..208af2518 100644 --- a/doc/man/restic-forget.1 +++ b/doc/man/restic-forget.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -21,136 +20,141 @@ is a reference to data stored there. In order to remove this (now unreferenced) data after 'forget' was run successfully, see the 'prune' command. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-l\fP, \fB\-\-keep\-last\fP=0 - keep the last \fB\fCn\fR snapshots + keep the last \fB\fCn\fR snapshots .PP \fB\-H\fP, \fB\-\-keep\-hourly\fP=0 - keep the last \fB\fCn\fR hourly snapshots + keep the last \fB\fCn\fR hourly snapshots .PP \fB\-d\fP, \fB\-\-keep\-daily\fP=0 - keep the last \fB\fCn\fR daily snapshots + keep the last \fB\fCn\fR daily snapshots .PP \fB\-w\fP, \fB\-\-keep\-weekly\fP=0 - keep the last \fB\fCn\fR weekly snapshots + keep the last \fB\fCn\fR weekly snapshots .PP \fB\-m\fP, \fB\-\-keep\-monthly\fP=0 - keep the last \fB\fCn\fR monthly snapshots + keep the last \fB\fCn\fR monthly snapshots .PP \fB\-y\fP, \fB\-\-keep\-yearly\fP=0 - keep the last \fB\fCn\fR yearly snapshots + keep the last \fB\fCn\fR yearly snapshots .PP \fB\-\-keep\-within\fP= - keep snapshots that are newer than \fB\fCduration\fR (eg. 1y5m7d2h) relative to the latest snapshot + keep snapshots that are newer than \fB\fCduration\fR (eg. 1y5m7d2h) relative to the latest snapshot .PP \fB\-\-keep\-tag\fP=[] - keep snapshots with this \fB\fCtaglist\fR (can be specified multiple times) + keep snapshots with this \fB\fCtaglist\fR (can be specified multiple times) .PP -\fB\-\-host\fP="" - only consider snapshots with the given \fB\fChost\fR +\fB\-\-host\fP=[] + only consider snapshots with the given \fB\fChost\fR (can be specified multiple times) .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) + only consider snapshots which include this \fB\fCtaglist\fR in the format \fB\fCtag[,tag,...]\fR (can be specified multiple times) .PP \fB\-\-path\fP=[] - only consider snapshots which include this (absolute) \fB\fCpath\fR (can be specified multiple times) + only consider snapshots which include this (absolute) \fB\fCpath\fR (can be specified multiple times) .PP \fB\-c\fP, \fB\-\-compact\fP[=false] - use compact format + use compact format .PP \fB\-g\fP, \fB\-\-group\-by\fP="host,paths" - string for grouping snapshots by host,paths,tags + string for grouping snapshots by host,paths,tags .PP \fB\-n\fP, \fB\-\-dry\-run\fP[=false] - do not delete anything, just print what would be done + do not delete anything, just print what would be done .PP \fB\-\-prune\fP[=false] - automatically run the 'prune' command if snapshots have been removed + automatically run the 'prune' command if snapshots have been removed .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for forget + help for forget .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-generate.1 b/doc/man/restic-generate.1 index 2ab782bf2..99aef55e1 100644 --- a/doc/man/restic-generate.1 +++ b/doc/man/restic-generate.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-generate \- Generate manual pages and auto\-completion files (bash, zsh) .SH SYNOPSIS .PP -\fBrestic generate [command] [flags]\fP +\fBrestic generate [flags]\fP .SH DESCRIPTION @@ -19,88 +18,93 @@ The "generate" command writes automatically generated files (like the man pages and the auto\-completion files for bash and zsh). +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-\-bash\-completion\fP="" - write bash completion \fB\fCfile\fR + write bash completion \fB\fCfile\fR .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for generate + help for generate .PP \fB\-\-man\fP="" - write man pages to \fB\fCdirectory\fR + write man pages to \fB\fCdirectory\fR .PP \fB\-\-zsh\-completion\fP="" - write zsh completion \fB\fCfile\fR + write zsh completion \fB\fCfile\fR .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-init.1 b/doc/man/restic-init.1 index f459ce0a0..24d4d8618 100644 --- a/doc/man/restic-init.1 +++ b/doc/man/restic-init.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -18,76 +17,101 @@ restic\-init \- Initialize a new repository The "init" command initializes a new repository. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS +.PP +\fB\-\-copy\-chunker\-params\fP[=false] + copy chunker parameters from the secondary repository (useful with the copy command) + .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for init + help for init + +.PP +\fB\-\-key\-hint2\fP="" + key ID of key to try decrypting the secondary repository first (default: $RESTIC\_KEY\_HINT2) + +.PP +\fB\-\-password\-command2\fP="" + shell \fB\fCcommand\fR to obtain the secondary repository password from (default: $RESTIC\_PASSWORD\_COMMAND2) + +.PP +\fB\-\-password\-file2\fP="" + \fB\fCfile\fR to read the secondary repository password from (default: $RESTIC\_PASSWORD\_FILE2) + +.PP +\fB\-\-repo2\fP="" + secondary repository to copy chunker parameters from (default: $RESTIC\_REPOSITORY2) .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-key.1 b/doc/man/restic-key.1 index 950683c18..4be707a59 100644 --- a/doc/man/restic-key.1 +++ b/doc/man/restic-key.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-key \- Manage keys (passwords) .SH SYNOPSIS .PP -\fBrestic key [list|add|remove|passwd] [ID] [flags]\fP +\fBrestic key [flags] [list|add|remove|passwd] [ID]\fP .SH DESCRIPTION @@ -18,80 +17,93 @@ restic\-key \- Manage keys (passwords) The "key" command manages keys (passwords) for accessing the repository. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for key + help for key + +.PP +\fB\-\-host\fP="" + the hostname for new keys .PP \fB\-\-new\-password\-file\fP="" - the file from which to load a new password + \fB\fCfile\fR from which to read the new password + +.PP +\fB\-\-user\fP="" + the username for new keys .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-list.1 b/doc/man/restic-list.1 index 4f50db46e..de1f96049 100644 --- a/doc/man/restic-list.1 +++ b/doc/man/restic-list.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-list \- List objects in the repository .SH SYNOPSIS .PP -\fBrestic list [blobs|packs|index|snapshots|keys|locks] [flags]\fP +\fBrestic list [flags] [blobs|packs|index|snapshots|keys|locks]\fP .SH DESCRIPTION @@ -18,76 +17,81 @@ restic\-list \- List objects in the repository The "list" command allows listing objects in the repository based on type. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for list + help for list .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-ls.1 b/doc/man/restic-ls.1 index e838ca1ac..5a9f7a269 100644 --- a/doc/man/restic-ls.1 +++ b/doc/man/restic-ls.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-ls \- List files in a snapshot .SH SYNOPSIS .PP -\fBrestic ls [flags] [snapshotID] [dir...]\fP +\fBrestic ls [flags] snapshotID [dir...]\fP .SH DESCRIPTION @@ -33,96 +32,101 @@ Any directory paths specified must be absolute (starting with a path separator); paths use the forward slash '/' as separator. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for ls + help for ls .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given (can be specified multiple times) .PP \fB\-l\fP, \fB\-\-long\fP[=false] - use a long listing format showing size and mode + use a long listing format showing size and mode .PP \fB\-\-path\fP=[] - only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot ID is given + 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 + 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 + only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot ID is given .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-migrate.1 b/doc/man/restic-migrate.1 index 24b577b9e..3f80a130c 100644 --- a/doc/man/restic-migrate.1 +++ b/doc/man/restic-migrate.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-migrate \- Apply migrations .SH SYNOPSIS .PP -\fBrestic migrate [name] [flags]\fP +\fBrestic migrate [flags] [name]\fP .SH DESCRIPTION @@ -19,80 +18,85 @@ The "migrate" command applies migrations to a repository. When no migration name is explicitly given, a list of migrations that can be applied is printed. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-f\fP, \fB\-\-force\fP[=false] - apply a migration a second time + apply a migration a second time .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for migrate + help for migrate .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-mount.1 b/doc/man/restic-mount.1 index 2c307fcf0..7c0f7b7d6 100644 --- a/doc/man/restic-mount.1 +++ b/doc/man/restic-mount.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -47,108 +46,112 @@ Mon Jan 2 15:04:05 \-0700 MST 2006 .PP For details please see the documentation for time.Format() at: - -\[la]https://godoc.org/time#Time.Format\[ra] + https://godoc.org/time#Time.Format + + +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. .SH OPTIONS .PP \fB\-\-allow\-other\fP[=false] - allow other users to access the data in the mounted directory + allow other users to access the data in the mounted directory .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for mount + help for mount .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this host +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this host (can be specified multiple times) .PP \fB\-\-no\-default\-permissions\fP[=false] - for 'allow\-other', ignore Unix permissions and allow users to read all snapshot files + for 'allow\-other', ignore Unix permissions and allow users to read all snapshot files .PP \fB\-\-owner\-root\fP[=false] - use 'root' as the owner of files and dirs + use 'root' as the owner of files and dirs .PP \fB\-\-path\fP=[] - only consider snapshots which include this (absolute) \fB\fCpath\fR + only consider snapshots which include this (absolute) \fB\fCpath\fR .PP \fB\-\-snapshot\-template\fP="2006\-01\-02T15:04:05Z07:00" - set \fB\fCtemplate\fR to use for snapshot dirs + set \fB\fCtemplate\fR to use for snapshot dirs .PP \fB\-\-tag\fP=[] - only consider snapshots which include this \fB\fCtaglist\fR + only consider snapshots which include this \fB\fCtaglist\fR .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-prune.1 b/doc/man/restic-prune.1 index 2089fddc8..518b52b44 100644 --- a/doc/man/restic-prune.1 +++ b/doc/man/restic-prune.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -19,76 +18,81 @@ The "prune" command checks the repository and removes data that is not referenced and therefore not needed any more. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for prune + help for prune .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-rebuild-index.1 b/doc/man/restic-rebuild-index.1 index d82e70f2c..aebf24c71 100644 --- a/doc/man/restic-rebuild-index.1 +++ b/doc/man/restic-rebuild-index.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -19,76 +18,81 @@ The "rebuild\-index" command creates a new index based on the pack files in the repository. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for rebuild\-index + help for rebuild\-index .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-recover.1 b/doc/man/restic-recover.1 index 6d25566b6..bcb619a5a 100644 --- a/doc/man/restic-recover.1 +++ b/doc/man/restic-recover.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -20,76 +19,81 @@ the raw data of the repository. It can be used if, for example, a snapshot has been removed by accident with "forget". +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for recover + help for recover .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-restore.1 b/doc/man/restic-restore.1 index 17e01f74c..7a92a2077 100644 --- a/doc/man/restic-restore.1 +++ b/doc/man/restic-restore.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -23,112 +22,117 @@ The special snapshot "latest" can be used to restore the latest snapshot in the repository. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-e\fP, \fB\-\-exclude\fP=[] - exclude a \fB\fCpattern\fR (can be specified multiple times) + exclude a \fB\fCpattern\fR (can be specified multiple times) .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for restore + help for restore .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this host when the snapshot ID is "latest" +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this host when the snapshot ID is "latest" (can be specified multiple times) .PP \fB\-\-iexclude\fP=[] - same as \fB\fC\-\-exclude\fR but ignores the casing of filenames + same as \fB\fC\-\-exclude\fR but ignores the casing of filenames .PP \fB\-\-iinclude\fP=[] - same as \fB\fC\-\-include\fR but ignores the casing of filenames + same as \fB\fC\-\-include\fR but ignores the casing of filenames .PP \fB\-i\fP, \fB\-\-include\fP=[] - include a \fB\fCpattern\fR, exclude everything else (can be specified multiple times) + include a \fB\fCpattern\fR, exclude everything else (can be specified multiple times) .PP \fB\-\-path\fP=[] - only consider snapshots which include this (absolute) \fB\fCpath\fR for snapshot ID "latest" + only consider snapshots which include this (absolute) \fB\fCpath\fR for snapshot ID "latest" .PP \fB\-\-tag\fP=[] - only consider snapshots which include this \fB\fCtaglist\fR for snapshot ID "latest" + only consider snapshots which include this \fB\fCtaglist\fR for snapshot ID "latest" .PP \fB\-t\fP, \fB\-\-target\fP="" - directory to extract data to + directory to extract data to .PP \fB\-\-verify\fP[=false] - verify restored files content + verify restored files content .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-self-update.1 b/doc/man/restic-self-update.1 index 1c221cd70..79869095e 100644 --- a/doc/man/restic-self-update.1 +++ b/doc/man/restic-self-update.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -21,80 +20,85 @@ authenticity of the binary is verified using the GPG signature on the release files. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for self\-update + help for self\-update .PP \fB\-\-output\fP="" - Save the downloaded file as \fB\fCfilename\fR (default: running binary itself) + Save the downloaded file as \fB\fCfilename\fR (default: running binary itself) .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-snapshots.1 b/doc/man/restic-snapshots.1 index dd06883c1..aba0d7886 100644 --- a/doc/man/restic-snapshots.1 +++ b/doc/man/restic-snapshots.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,7 +9,7 @@ restic\-snapshots \- List all snapshots .SH SYNOPSIS .PP -\fBrestic snapshots [snapshotID ...] [flags]\fP +\fBrestic snapshots [flags] [snapshotID ...]\fP .SH DESCRIPTION @@ -18,100 +17,105 @@ restic\-snapshots \- List all snapshots The "snapshots" command lists all snapshots stored in the repository. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-c\fP, \fB\-\-compact\fP[=false] - use compact format + use compact format .PP \fB\-g\fP, \fB\-\-group\-by\fP="" - string for grouping snapshots by host,paths,tags + string for grouping snapshots by host,paths,tags .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for snapshots + help for snapshots .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this \fB\fChost\fR +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this \fB\fChost\fR (can be specified multiple times) .PP \fB\-\-last\fP[=false] - only show the last snapshot for each host and path + only show the last snapshot for each host and path .PP \fB\-\-path\fP=[] - only consider snapshots for this \fB\fCpath\fR (can be specified multiple times) + only consider snapshots for this \fB\fCpath\fR (can be specified multiple times) .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 (can be specified multiple times) .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-stats.1 b/doc/man/restic-stats.1 index 41ac2f732..af4bcebdc 100644 --- a/doc/man/restic-stats.1 +++ b/doc/man/restic-stats.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -10,21 +9,22 @@ restic\-stats \- Scan the repository and show basic statistics .SH SYNOPSIS .PP -\fBrestic stats [flags] [snapshot\-ID]\fP +\fBrestic stats [flags] [snapshot ID] [...]\fP .SH DESCRIPTION .PP -The "stats" command walks one or all snapshots in a repository and -accumulates statistics about the data stored therein. It reports on -the number of unique files and their sizes, according to one of +The "stats" command walks one or multiple snapshots in a repository +and accumulates statistics about the data stored therein. It reports +on the number of unique files and their sizes, according to one of the counting modes as given by the \-\-mode flag. .PP -If no snapshot is specified, all snapshots will be considered. Some -modes make more sense over just a single snapshot, while others -are useful across all snapshots, depending on what you are trying -to calculate. +It operates on all snapshots matching the selection criteria or all +snapshots if nothing is specified. The special snapshot ID "latest" +is also supported. Some modes make more sense over +just a single snapshot, while others are useful across all snapshots, +depending on what you are trying to calculate. .PP The modes are: @@ -47,84 +47,97 @@ blobs\-per\-file: A combination of files\-by\-contents and raw\-data. Refer to the online manual for more details about each mode. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for stats + help for stats .PP -\fB\-H\fP, \fB\-\-host\fP="" - filter latest snapshot by this hostname +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots with the given \fB\fChost\fR (can be specified multiple times) .PP \fB\-\-mode\fP="restore\-size" - counting mode: restore\-size (default), files\-by\-contents, blobs\-per\-file, or raw\-data + counting mode: restore\-size (default), files\-by\-contents, blobs\-per\-file or raw\-data + +.PP +\fB\-\-path\fP=[] + only consider snapshots which include this (absolute) \fB\fCpath\fR (can be specified multiple times) + +.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) .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-tag.1 b/doc/man/restic-tag.1 index c7e8ddbf1..1146fac64 100644 --- a/doc/man/restic-tag.1 +++ b/doc/man/restic-tag.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -25,100 +24,105 @@ add tags to/remove tags from the existing set. When no snapshot\-ID is given, all snapshots matching the host, tag and path filter criteria are modified. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-\-add\fP=[] - \fB\fCtag\fR which will be added to the existing tags (can be given multiple times) + \fB\fCtag\fR which will be added to the existing tags (can be given multiple times) .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for tag + help for tag .PP -\fB\-H\fP, \fB\-\-host\fP="" - only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given +\fB\-H\fP, \fB\-\-host\fP=[] + only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given (can be specified multiple times) .PP \fB\-\-path\fP=[] - only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot\-ID is given + only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot\-ID is given .PP \fB\-\-remove\fP=[] - \fB\fCtag\fR which will be removed from the existing tags (can be given multiple times) + \fB\fCtag\fR which will be removed from the existing tags (can be given multiple times) .PP \fB\-\-set\fP=[] - \fB\fCtag\fR which will replace the existing tags (can be given multiple times) + \fB\fCtag\fR which will replace the existing tags (can be given multiple times) .PP \fB\-\-tag\fP=[] - only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot\-ID is given + only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot\-ID is given .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-unlock.1 b/doc/man/restic-unlock.1 index 10e3b51ff..fbbac4748 100644 --- a/doc/man/restic-unlock.1 +++ b/doc/man/restic-unlock.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -18,80 +17,85 @@ restic\-unlock \- Remove locks other processes created The "unlock" command removes stale locks that have been created by other restic processes. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for unlock + help for unlock .PP \fB\-\-remove\-all\fP[=false] - remove all locks, even non\-stale ones + remove all locks, even non\-stale ones .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic-version.1 b/doc/man/restic-version.1 index d107cf618..5238643a9 100644 --- a/doc/man/restic-version.1 +++ b/doc/man/restic-version.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -19,76 +18,81 @@ The "version" command prints detailed information about the build environment and the version of this software. +.SH EXIT STATUS +.PP +Exit status is 0 if the command was successful, and non\-zero if there was any error. + + .SH OPTIONS .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for version + help for version .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO diff --git a/doc/man/restic.1 b/doc/man/restic.1 index 8a483df4f..98d9e73f8 100644 --- a/doc/man/restic.1 +++ b/doc/man/restic.1 @@ -1,7 +1,6 @@ -.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" "" .nh -.ad l - +.TH restic backup(1)Jan 2017 +generated by \fB\fCrestic generate\fR .SH NAME .PP @@ -22,73 +21,73 @@ directories in an encrypted repository stored on different backends. .SH OPTIONS .PP \fB\-\-cacert\fP=[] - \fB\fCfile\fR to load root certificates from (default: use system certificates) + \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) + set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] - auto remove old cache directories + auto remove old cache directories .PP \fB\-h\fP, \fB\-\-help\fP[=false] - help for restic + help for restic .PP \fB\-\-json\fP[=false] - set output mode to JSON for commands that support it + set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" - key ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) + \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 - limits downloads to a maximum rate in KiB/s. (default: unlimited) + 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) + limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] - do not use a local cache + 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 + 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) + set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" - specify a shell command to obtain a password (default: $RESTIC\_PASSWORD\_COMMAND) + shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" - read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE) + \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] - do not output comprehensive progress report + do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" - repository to backup to or restore from (default: $RESTIC\_REPOSITORY) + \fB\fCrepository\fR 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 + path to a \fB\fCfile\fR 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) + be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .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\-recover(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 +\fBrestic\-backup(1)\fP, \fBrestic\-cache(1)\fP, \fBrestic\-cat(1)\fP, \fBrestic\-check(1)\fP, \fBrestic\-copy(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\-recover(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 diff --git a/doc/zsh-completion.zsh b/doc/zsh-completion.zsh index 7595387d2..848acbd9c 100644 --- a/doc/zsh-completion.zsh +++ b/doc/zsh-completion.zsh @@ -1,20 +1,827 @@ -#compdef restic +#compdef _restic restic + + +function _restic { + local -a commands + + _arguments -C \ + '*--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]' \ + '(-h --help)'{-h,--help}'[help for restic]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' \ + "1: :->cmnds" \ + "*::arg:->args" + + case $state in + cmnds) + commands=( + "backup:Create a new backup of files and/or directories" + "cache:Operate on local cache directories" + "cat:Print internal objects to stdout" + "check:Check the repository for errors" + "copy:Copy snapshots from one repository to another" + "diff:Show differences between two snapshots" + "dump:Print a backed-up file to stdout" + "find:Find a file, a directory or restic IDs" + "forget:Remove snapshots from the repository" + "generate:Generate manual pages and auto-completion files (bash, zsh)" + "help:Help about any command" + "init:Initialize a new repository" + "key:Manage keys (passwords)" + "list:List objects in the repository" + "ls:List files in a snapshot" + "migrate:Apply migrations" + "mount:Mount the repository" + "prune:Remove unneeded data from the repository" + "rebuild-index:Build a new index file" + "recover:Recover data from the repository" + "restore:Extract the data from a snapshot" + "self-update:Update the restic binary" + "snapshots:List all snapshots" + "stats:Scan the repository and show basic statistics" + "tag:Modify tags on snapshots" + "unlock:Remove locks other processes created" + "version:Print version information" + ) + _describe "command" commands + ;; + esac + + case "$words[1]" in + backup) + _restic_backup + ;; + cache) + _restic_cache + ;; + cat) + _restic_cat + ;; + check) + _restic_check + ;; + copy) + _restic_copy + ;; + diff) + _restic_diff + ;; + dump) + _restic_dump + ;; + find) + _restic_find + ;; + forget) + _restic_forget + ;; + generate) + _restic_generate + ;; + help) + _restic_help + ;; + init) + _restic_init + ;; + key) + _restic_key + ;; + list) + _restic_list + ;; + ls) + _restic_ls + ;; + migrate) + _restic_migrate + ;; + mount) + _restic_mount + ;; + prune) + _restic_prune + ;; + rebuild-index) + _restic_rebuild-index + ;; + recover) + _restic_recover + ;; + restore) + _restic_restore + ;; + self-update) + _restic_self-update + ;; + snapshots) + _restic_snapshots + ;; + stats) + _restic_stats + ;; + tag) + _restic_tag + ;; + unlock) + _restic_unlock + ;; + version) + _restic_version + ;; + esac +} + +function _restic_backup { + _arguments \ + '(*-e *--exclude)'{\*-e,\*--exclude}'[exclude a `pattern` (can be specified multiple times)]:' \ + '--exclude-caches[excludes cache directories that are marked with a CACHEDIR.TAG file. See https://bford.info/cachedir/ for the Cache Directory Tagging Standard]' \ + '*--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)]:' \ + '(-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-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)]:' \ + '--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)]:' \ + '--cache-dir[set the cache `directory`. (default: use system default cache directory)]:' \ + '--cleanup-cache[auto remove old cache directories]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_cache { + _arguments \ + '--cleanup[remove old cache directories]' \ + '(-h --help)'{-h,--help}'[help for cache]' \ + '--max-age[max age in `days` for cache directories to be considered old]:' \ + '--no-size[do not output the size of the cache directories]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_cat { + _arguments \ + '(-h --help)'{-h,--help}'[help for cat]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_check { + _arguments \ + '--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`)]:' \ + '--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)]:' \ + '--cleanup-cache[auto remove old cache directories]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_copy { + _arguments \ + '(-h --help)'{-h,--help}'[help for copy]' \ + '(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this `host`, when no snapshot ID is given (can be specified multiple times)]:' \ + '--key-hint2[key ID of key to try decrypting the destination repository first (default: $RESTIC_KEY_HINT2)]:' \ + '--password-command2[shell `command` to obtain the destination repository password from (default: $RESTIC_PASSWORD_COMMAND2)]:' \ + '--password-file2[`file` to read the destination repository password from (default: $RESTIC_PASSWORD_FILE2)]:' \ + '*--path[only consider snapshots which include this (absolute) `path`, when no snapshot ID is given]:' \ + '--repo2[destination repository to copy snapshots to (default: $RESTIC_REPOSITORY2)]:' \ + '--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)]:' \ + '--cleanup-cache[auto remove old cache directories]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_diff { + _arguments \ + '(-h --help)'{-h,--help}'[help for diff]' \ + '--metadata[print changes in metadata]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_dump { + _arguments \ + '(-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"]:' \ + '--tag[only consider snapshots which include this `taglist` for snapshot ID "latest"]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_find { + _arguments \ + '--blob[pattern is a blob-ID]' \ + '(-h --help)'{-h,--help}'[help for find]' \ + '(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this `host`, when no snapshot ID is given (can be specified multiple times)]:' \ + '(-i --ignore-case)'{-i,--ignore-case}'[ignore case for pattern]' \ + '(-l --long)'{-l,--long}'[use a long listing format showing size and mode]' \ + '(-N --newest)'{-N,--newest}'[newest modification date/time]:' \ + '(-O --oldest)'{-O,--oldest}'[oldest modification date/time]:' \ + '--pack[pattern is a pack-ID]' \ + '*--path[only consider snapshots which include this (absolute) `path`, when no snapshot-ID is given]:' \ + '--show-pack-id[display the pack-ID the blobs belong to (with --blob or --tree)]' \ + '(*-s *--snapshot)'{\*-s,\*--snapshot}'[snapshot `id` to search in (can be given multiple times)]:' \ + '--tag[only consider snapshots which include this `taglist`, when no snapshot-ID is given]:' \ + '--tree[pattern is a tree-ID]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_forget { + _arguments \ + '(-l --keep-last)'{-l,--keep-last}'[keep the last `n` snapshots]:' \ + '(-H --keep-hourly)'{-H,--keep-hourly}'[keep the last `n` hourly snapshots]:' \ + '(-d --keep-daily)'{-d,--keep-daily}'[keep the last `n` daily snapshots]:' \ + '(-w --keep-weekly)'{-w,--keep-weekly}'[keep the last `n` weekly snapshots]:' \ + '(-m --keep-monthly)'{-m,--keep-monthly}'[keep the last `n` monthly snapshots]:' \ + '(-y --keep-yearly)'{-y,--keep-yearly}'[keep the last `n` yearly snapshots]:' \ + '--keep-within[keep snapshots that are newer than `duration` (eg. 1y5m7d2h) relative to the latest snapshot]:' \ + '--keep-tag[keep snapshots with this `taglist` (can be specified multiple times)]:' \ + '*--host[only consider snapshots with the given `host` (can be specified multiple times)]:' \ + '--tag[only consider snapshots which include this `taglist` in the format `tag[,tag,...]` (can be specified multiple times)]:' \ + '*--path[only consider snapshots which include this (absolute) `path` (can be specified multiple times)]:' \ + '(-c --compact)'{-c,--compact}'[use compact format]' \ + '(-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]' \ + '(-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)]:' \ + '--cleanup-cache[auto remove old cache directories]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_generate { + _arguments \ + '--bash-completion[write bash completion `file`]:' \ + '(-h --help)'{-h,--help}'[help for generate]' \ + '--man[write man pages to `directory`]:' \ + '--zsh-completion[write zsh completion `file`]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_help { + _arguments \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_init { + _arguments \ + '--copy-chunker-params[copy chunker parameters from the secondary repository (useful with the copy command)]' \ + '(-h --help)'{-h,--help}'[help for init]' \ + '--key-hint2[key ID of key to try decrypting the secondary repository first (default: $RESTIC_KEY_HINT2)]:' \ + '--password-command2[shell `command` to obtain the secondary repository password from (default: $RESTIC_PASSWORD_COMMAND2)]:' \ + '--password-file2[`file` to read the secondary repository password from (default: $RESTIC_PASSWORD_FILE2)]:' \ + '--repo2[secondary repository to copy chunker parameters from (default: $RESTIC_REPOSITORY2)]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_key { + _arguments \ + '(-h --help)'{-h,--help}'[help for key]' \ + '--host[the hostname for new keys]:' \ + '--new-password-file[`file` from which to read the new password]:' \ + '--user[the username for new keys]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_list { + _arguments \ + '(-h --help)'{-h,--help}'[help for list]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_ls { + _arguments \ + '(-h --help)'{-h,--help}'[help for ls]' \ + '(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this `host`, when no snapshot ID is given (can be specified multiple times)]:' \ + '(-l --long)'{-l,--long}'[use a long listing format showing size and mode]' \ + '*--path[only consider snapshots which include this (absolute) `path`, when no snapshot ID is given]:' \ + '--recursive[include files in subfolders of the listed directories]' \ + '--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)]:' \ + '--cleanup-cache[auto remove old cache directories]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_migrate { + _arguments \ + '(-f --force)'{-f,--force}'[apply a migration a second time]' \ + '(-h --help)'{-h,--help}'[help for migrate]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_mount { + _arguments \ + '--allow-other[allow other users to access the data in the mounted directory]' \ + '(-h --help)'{-h,--help}'[help for mount]' \ + '(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this host (can be specified multiple times)]:' \ + '--no-default-permissions[for '\''allow-other'\'', ignore Unix permissions and allow users to read all snapshot files]' \ + '--owner-root[use '\''root'\'' as the owner of files and dirs]' \ + '*--path[only consider snapshots which include this (absolute) `path`]:' \ + '--snapshot-template[set `template` to use for snapshot dirs]:' \ + '--tag[only consider snapshots which include this `taglist`]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_prune { + _arguments \ + '(-h --help)'{-h,--help}'[help for prune]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_rebuild-index { + _arguments \ + '(-h --help)'{-h,--help}'[help for rebuild-index]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_recover { + _arguments \ + '(-h --help)'{-h,--help}'[help for recover]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_restore { + _arguments \ + '(*-e *--exclude)'{\*-e,\*--exclude}'[exclude a `pattern` (can be specified multiple times)]:' \ + '(-h --help)'{-h,--help}'[help for restore]' \ + '(*-H *--host)'{\*-H,\*--host}'[only consider snapshots for this host when the snapshot ID is "latest" (can be specified multiple times)]:' \ + '*--iexclude[same as `--exclude` but ignores the casing of filenames]:' \ + '*--iinclude[same as `--include` but ignores the casing of filenames]:' \ + '(*-i *--include)'{\*-i,\*--include}'[include a `pattern`, exclude everything else (can be specified multiple times)]:' \ + '*--path[only consider snapshots which include this (absolute) `path` for snapshot ID "latest"]:' \ + '--tag[only consider snapshots which include this `taglist` for snapshot ID "latest"]:' \ + '(-t --target)'{-t,--target}'[directory to extract data to]:' \ + '--verify[verify restored files content]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_self-update { + _arguments \ + '(-h --help)'{-h,--help}'[help for self-update]' \ + '--output[Save the downloaded file as `filename` (default: running binary itself)]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_snapshots { + _arguments \ + '(-c --compact)'{-c,--compact}'[use compact format]' \ + '(-g --group-by)'{-g,--group-by}'[string for grouping snapshots by host,paths,tags]:' \ + '(-h --help)'{-h,--help}'[help for 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)]:' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_stats { + _arguments \ + '(-h --help)'{-h,--help}'[help for stats]' \ + '(*-H *--host)'{\*-H,\*--host}'[only consider snapshots with the given `host` (can be specified multiple times)]:' \ + '--mode[counting mode: restore-size (default), files-by-contents, blobs-per-file or raw-data]:' \ + '*--path[only consider snapshots which include this (absolute) `path` (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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_tag { + _arguments \ + '*--add[`tag` which will be added to the existing tags (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)]:' \ + '--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)]:' \ + '--cleanup-cache[auto remove old cache directories]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_unlock { + _arguments \ + '(-h --help)'{-h,--help}'[help for unlock]' \ + '--remove-all[remove all locks, even non-stale ones]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} + +function _restic_version { + _arguments \ + '(-h --help)'{-h,--help}'[help for version]' \ + '*--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]' \ + '--json[set output mode to JSON for commands that support it]' \ + '--key-hint[`key` ID of key to try decrypting first (default: $RESTIC_KEY_HINT)]:' \ + '--limit-download[limits downloads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--limit-upload[limits uploads to a maximum rate in KiB/s. (default: unlimited)]:' \ + '--no-cache[do not use a local cache]' \ + '--no-lock[do not lock the repo, this allows some operations on read-only repos]' \ + '(*-o *--option)'{\*-o,\*--option}'[set extended option (`key=value`, can be specified multiple times)]:' \ + '--password-command[shell `command` to obtain the repository password from (default: $RESTIC_PASSWORD_COMMAND)]:' \ + '(-p --password-file)'{-p,--password-file}'[`file` to read the repository password from (default: $RESTIC_PASSWORD_FILE)]:' \ + '(-q --quiet)'{-q,--quiet}'[do not output comprehensive progress report]' \ + '(-r --repo)'{-r,--repo}'[`repository` to backup to or restore from (default: $RESTIC_REPOSITORY)]:' \ + '--tls-client-cert[path to a `file` containing PEM encoded TLS client certificate and private key]:' \ + '(-v --verbose)'{-v,--verbose}'[be verbose (specify --verbose multiple times or level --verbose=`n`)]' +} -_arguments \ - '1: :->level1' \ - '2: :_files' -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 recover restore self-update snapshots stats tag unlock version)' - ;; - *) - _arguments '*: :_files' - ;; - esac - ;; - *) - _arguments '*: :_files' - ;; -esac