mise.toml 🔗
@@ -26,6 +26,9 @@ if [ -n "$output" ]; then
fi
"""
+[tasks.fix]
+run = "jj --config 'fix.tools.gofumpt.command=[\"gofumpt\"]' --config 'fix.tools.gofumpt.patterns=[\"glob:**/*.go\"]' fix"
+
[tasks.lint]
run = "golangci-lint run"
Amolith created
mise.toml | 3
restic-cli-catalogue.md | 1055 -------------------------------------------
2 files changed, 3 insertions(+), 1,055 deletions(-)
@@ -26,6 +26,9 @@ if [ -n "$output" ]; then
fi
"""
+[tasks.fix]
+run = "jj --config 'fix.tools.gofumpt.command=[\"gofumpt\"]' --config 'fix.tools.gofumpt.patterns=[\"glob:**/*.go\"]' fix"
+
[tasks.lint]
run = "golangci-lint run"
@@ -1,1055 +0,0 @@
-# Restic CLI Catalogue
-
-**Version:** 0.18.1 (compiled with go1.25.6 on linux/amd64)
-
-Generated from `restic --help` and `restic <command> --help` output on 2026-03-13.
-
----
-
-## Table of Contents
-
-- [Global Flags](#global-flags)
-- [Commands](#commands)
- - [backup](#backup)
- - [cache](#cache)
- - [cat](#cat)
- - [check](#check)
- - [copy](#copy)
- - [diff](#diff)
- - [dump](#dump)
- - [find](#find)
- - [forget](#forget)
- - [init](#init)
- - [key](#key)
- - [key add](#key-add)
- - [key list](#key-list)
- - [key passwd](#key-passwd)
- - [key remove](#key-remove)
- - [list](#list)
- - [ls](#ls)
- - [migrate](#migrate)
- - [mount](#mount)
- - [prune](#prune)
- - [recover](#recover)
- - [repair](#repair)
- - [repair index](#repair-index)
- - [repair packs](#repair-packs)
- - [repair snapshots](#repair-snapshots)
- - [restore](#restore)
- - [rewrite](#rewrite)
- - [snapshots](#snapshots)
- - [stats](#stats)
- - [tag](#tag)
- - [unlock](#unlock)
-- [Advanced / Additional Commands](#advanced--additional-commands)
- - [features](#features)
- - [options](#options)
- - [generate](#generate)
- - [version](#version)
-
----
-
-## Global Flags
-
-These flags apply to **all** commands. They are inherited by every subcommand. None are strictly required — the repository and password can be supplied via environment variables instead of flags.
-
-| Long | Short | Type | Default | Description |
-|------|-------|------|---------|-------------|
-| `--cacert` | | file (string) | system certificates or `$RESTIC_CACERT` | File to load root certificates from |
-| `--cache-dir` | | directory (string) | system default cache directory | Set the cache directory |
-| `--cleanup-cache` | | bool | `false` | Auto remove old cache directories |
-| `--compression` | | mode (string) | `auto` (or `$RESTIC_COMPRESSION`) | Compression mode (only for repo format v2), one of `auto\|off\|max` |
-| `--help` | `-h` | bool | `false` | Help for restic |
-| `--http-user-agent` | | string | `""` | Set a http user agent for outgoing http requests |
-| `--insecure-no-password` | | bool | `false` | Use an empty password for the repository (insecure) |
-| `--insecure-tls` | | bool | `false` | Skip TLS certificate verification when connecting to the repository (insecure) |
-| `--json` | | bool | `false` | Set output mode to JSON for commands that support it |
-| `--key-hint` | | key (string) | `$RESTIC_KEY_HINT` | Key ID of key to try decrypting first |
-| `--limit-download` | | rate (int, KiB/s) | unlimited | Limits downloads to a maximum rate in KiB/s |
-| `--limit-upload` | | rate (int, KiB/s) | unlimited | Limits uploads to a maximum rate in KiB/s |
-| `--no-cache` | | bool | `false` | Do not use a local cache |
-| `--no-extra-verify` | | bool | `false` | Skip additional verification of data before upload (see documentation) |
-| `--no-lock` | | bool | `false` | Do not lock the repository, this allows some operations on read-only repositories |
-| `--option` | `-o` | key=value (string, repeatable) | — | Set extended option (can be specified multiple times) |
-| `--pack-size` | | size (int, MiB) | `$RESTIC_PACK_SIZE` | Set target pack size in MiB, created pack files may be larger |
-| `--password-command` | | command (string) | `$RESTIC_PASSWORD_COMMAND` | Shell command to obtain the repository password from |
-| `--password-file` | `-p` | file (string) | `$RESTIC_PASSWORD_FILE` | File to read the repository password from |
-| `--quiet` | `-q` | bool | `false` | Do not output comprehensive progress report |
-| `--repo` | `-r` | repository (string) | `$RESTIC_REPOSITORY` | Repository to backup to or restore from |
-| `--repository-file` | | file (string) | `$RESTIC_REPOSITORY_FILE` | File to read the repository location from |
-| `--retry-lock` | | duration | no retries | Retry to lock the repository if it is already locked, takes a value like `5m` or `2h` |
-| `--stuck-request-timeout` | | duration | `5m0s` | Duration after which to retry stuck requests |
-| `--tls-client-cert` | | file (string) | `$RESTIC_TLS_CLIENT_CERT` | Path to a file containing PEM encoded TLS client certificate and private key |
-| `--verbose` | `-v` | int (repeatable) | `0` | Be verbose (specify multiple times or a level using `--verbose=n`, max level/times is 2) |
-
----
-
-## Commands
-
----
-
-### backup
-
-**Description:** Create a new backup of files and/or directories.
-
-**Usage:** `restic backup [flags] [FILE/DIR] ...`
-
-**Exit codes:** 0 = success, 1 = fatal error (no snapshot created), 3 = some source data could not be read (incomplete snapshot created), 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `FILE/DIR ...` | optional (but at least one source is needed — can come from `--files-from*` or `--stdin` instead) | Files and/or directories to back up |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--dry-run` | `-n` | bool | `false` | optional | Do not upload or write any data, just show what would be done |
-| `--exclude` | `-e` | pattern (string, repeatable) | — | optional | Exclude a pattern (can be specified multiple times) |
-| `--exclude-caches` | | bool | `false` | optional | Excludes cache directories that are marked with a CACHEDIR.TAG file |
-| `--exclude-file` | | file (string, repeatable) | — | optional | Read exclude patterns from a file (can be specified multiple times) |
-| `--exclude-if-present` | | filename[:header] (string, repeatable) | — | optional | Exclude contents of directories containing filename (except filename itself) if header matches (can be specified multiple times) |
-| `--exclude-larger-than` | | size (string) | — | optional | Max size of the files to be backed up (allowed suffixes: k/K, m/M, g/G, t/T) |
-| `--files-from` | | file (string, repeatable) | — | optional | Read the files to backup from file (can be combined with file args; can be specified multiple times) |
-| `--files-from-raw` | | file (string, repeatable) | — | optional | Read the files to backup from file (can be combined with file args; can be specified multiple times) |
-| `--files-from-verbatim` | | file (string, repeatable) | — | optional | Read the files to backup from file (can be combined with file args; can be specified multiple times) |
-| `--force` | `-f` | bool | `false` | optional | Force re-reading the source files/directories (overrides the "parent" flag) |
-| `--group-by` | `-g` | group (string) | `host,paths` | optional | Group snapshots by host, paths and/or tags, separated by comma (disable grouping with '') |
-| `--help` | `-h` | bool | `false` | optional | Help for backup |
-| `--host` | `-H` | hostname (string) | `$RESTIC_HOST` | optional | Set the hostname for the snapshot manually. To prevent an expensive rescan use the "parent" flag |
-| `--iexclude` | | pattern (string, repeatable) | — | optional | Same as --exclude but ignores the casing of filenames |
-| `--iexclude-file` | | file (string, repeatable) | — | optional | Same as --exclude-file but ignores casing of filenames in patterns |
-| `--ignore-ctime` | | bool | `false` | optional | Ignore ctime changes when checking for modified files |
-| `--ignore-inode` | | bool | `false` | optional | Ignore inode number and ctime changes when checking for modified files |
-| `--no-scan` | | bool | `false` | optional | Do not run scanner to estimate size of backup |
-| `--one-file-system` | `-x` | bool | `false` | optional | Exclude other file systems, don't cross filesystem boundaries and subvolumes |
-| `--parent` | | snapshot (string) | latest snapshot in group | optional | Use this parent snapshot |
-| `--read-concurrency` | | int | `$RESTIC_READ_CONCURRENCY` or `2` | optional | Read n files concurrently |
-| `--skip-if-unchanged` | | bool | `false` | optional | Skip snapshot creation if identical to parent snapshot |
-| `--stdin` | | bool | `false` | optional | Read backup from stdin |
-| `--stdin-filename` | | filename (string) | `"stdin"` | optional | Filename to use when reading from stdin |
-| `--stdin-from-command` | | bool | `false` | optional | Interpret arguments as command to execute and store its stdout |
-| `--tag` | | tags (string-list, repeatable) | `[]` | optional | Add tags for the new snapshot in the format `tag[,tag,...]` (can be specified multiple times) |
-| `--time` | | time (string) | now | optional | Time of the backup (ex. '2012-11-01 22:08:41') |
-| `--with-atime` | | bool | `false` | optional | Store the atime for all files and directories |
-
----
-
-### cache
-
-**Description:** Operate on local cache directories.
-
-**Usage:** `restic cache [flags]`
-
-**Exit codes:** 0 = success, 1 = error.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--cleanup` | | bool | `false` | optional | Remove old cache directories |
-| `--help` | `-h` | bool | `false` | optional | Help for cache |
-| `--max-age` | | int (days) | `30` | optional | Max age in days for cache directories to be considered old |
-| `--no-size` | | bool | `false` | optional | Do not output the size of the cache directories |
-
----
-
-### cat
-
-**Description:** Print internal objects to stdout.
-
-**Usage:** `restic cat [flags] [masterkey|config|pack ID|blob ID|snapshot ID|index ID|key ID|lock ID|tree snapshot:subfolder]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| object type + ID | **required** | One of: `masterkey`, `config`, `pack ID`, `blob ID`, `snapshot ID`, `index ID`, `key ID`, `lock ID`, `tree snapshot:subfolder` |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for cat |
-
----
-
-### check
-
-**Description:** Test the repository for errors and report any errors found. Can also read all data to simulate a restore.
-
-**Usage:** `restic check [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-**Note:** By default, the check command will always load all data directly from the repository and not use a local cache.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for check |
-| `--read-data` | | bool | `false` | optional | Read all data blobs |
-| `--read-data-subset` | | subset (string) | — | optional | Read a subset of data packs, specified as 'n/t' for specific part, or either 'x%' or 'x.y%' or a size in bytes with suffixes k/K, m/M, g/G, t/T for a random subset |
-| `--with-cache` | | bool | `false` | optional | Use existing cache, only read uncached data from repository |
-
----
-
-### copy
-
-**Description:** Copy snapshots from one repository to another.
-
-**Usage:** `restic copy [flags] [snapshotID ...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID ...` | optional | Snapshot IDs to copy (if omitted, copies all matching snapshots) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--from-insecure-no-password` | | bool | `false` | optional | Use an empty password for the source repository (insecure) |
-| `--from-key-hint` | | string | `$RESTIC_FROM_KEY_HINT` | optional | Key ID of key to try decrypting the source repository first |
-| `--from-password-command` | | command (string) | `$RESTIC_FROM_PASSWORD_COMMAND` | optional | Shell command to obtain the source repository password from |
-| `--from-password-file` | | file (string) | `$RESTIC_FROM_PASSWORD_FILE` | optional | File to read the source repository password from |
-| `--from-repo` | | repository (string) | `$RESTIC_FROM_REPOSITORY` | **required** (or env) | Source repository to copy snapshots from |
-| `--from-repository-file` | | file (string) | `$RESTIC_FROM_REPOSITORY_FILE` | optional | File from which to read the source repository location |
-| `--help` | `-h` | bool | `false` | optional | Help for copy |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path (can be specified multiple times) |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-
----
-
-### diff
-
-**Description:** Show differences between two snapshots.
-
-**Usage:** `restic diff [flags] snapshotID snapshotID`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-**Output key:** `+` = added, `-` = removed, `U` = metadata updated, `M` = content modified, `T` = type changed, `?` = bitrot detected.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID` (first) | **required** | First snapshot (supports `snapshotID:subfolder` syntax) |
-| `snapshotID` (second) | **required** | Second snapshot (supports `snapshotID:subfolder` syntax) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for diff |
-| `--metadata` | | bool | `false` | optional | Print changes in metadata |
-
----
-
-### dump
-
-**Description:** Print a backed-up file to stdout. Folders are output as tar (default) or zip.
-
-**Usage:** `restic dump [flags] snapshotID file`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID` | **required** | Snapshot ID to dump from (special value `latest` supported; supports `snapshotID:subfolder` syntax) |
-| `file` | **required** | File path within the snapshot to dump (pass `/` for whole snapshot as archive) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--archive` | `-a` | format (string) | `"tar"` | optional | Set archive format as "tar" or "zip" |
-| `--help` | `-h` | bool | `false` | optional | Help for dump |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host, when snapshot ID "latest" is given (can be specified multiple times) |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path, when snapshot ID "latest" is given |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...], when snapshot ID "latest" is given |
-| `--target` | `-t` | path (string) | — | optional | Write the output to target path |
-
----
-
-### find
-
-**Description:** Find a file, a directory or restic IDs.
-
-**Usage:** `restic find [flags] PATTERN...`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `PATTERN ...` | **required** | One or more search patterns (file/dir names, or IDs when `--blob`/`--tree`/`--pack` is used) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--blob` | | bool | `false` | optional | Pattern is a blob-ID |
-| `--help` | `-h` | bool | `false` | optional | Help for find |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--human-readable` | | bool | `false` | optional | Print sizes in human readable format |
-| `--ignore-case` | `-i` | bool | `false` | optional | Ignore case for pattern |
-| `--long` | `-l` | bool | `false` | optional | Use a long listing format showing size and mode |
-| `--newest` | `-N` | string | — | optional | Newest modification date/time |
-| `--oldest` | `-O` | string | — | optional | Oldest modification date/time |
-| `--pack` | | bool | `false` | optional | Pattern is a pack-ID |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--reverse` | `-R` | bool | `false` | optional | Reverse sort order oldest to newest |
-| `--show-pack-id` | | bool | `false` | optional | Display the pack-ID the blobs belong to (with --blob or --tree) |
-| `--snapshot` | `-s` | id (string, repeatable) | — | optional | Snapshot id to search in (can be given multiple times) |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-| `--tree` | | bool | `false` | optional | Pattern is a tree-ID |
-
----
-
-### forget
-
-**Description:** Remove snapshots from the repository according to a policy.
-
-**Usage:** `restic forget [flags] [snapshot ID] [...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-**Note:** This only deletes snapshot objects (references). Use `prune` to remove unreferenced data afterwards.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshot ID ...` | optional | Specific snapshot IDs to forget (if omitted, uses policy flags to select) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--compact` | `-c` | bool | `false` | optional | Use compact output format |
-| `--dry-run` | `-n` | bool | `false` | optional | Do not delete anything, just print what would be done |
-| `--group-by` | `-g` | group (string) | `host,paths` | optional | Group snapshots by host, paths and/or tags, separated by comma (disable grouping with '') |
-| `--help` | `-h` | bool | `false` | optional | Help for forget |
-| `--host` | | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--keep-daily` | `-d` | int or `unlimited` | — | optional | Keep the last n daily snapshots |
-| `--keep-hourly` | `-H` | int or `unlimited` | — | optional | Keep the last n hourly snapshots |
-| `--keep-last` | `-l` | int or `unlimited` | — | optional | Keep the last n snapshots |
-| `--keep-monthly` | `-m` | int or `unlimited` | — | optional | Keep the last n monthly snapshots |
-| `--keep-tag` | | taglist (string-list, repeatable) | `[]` | optional | Keep snapshots with this taglist (can be specified multiple times) |
-| `--keep-weekly` | `-w` | int or `unlimited` | — | optional | Keep the last n weekly snapshots |
-| `--keep-within` | | duration (string) | — | optional | Keep snapshots newer than duration (eg. 1y5m7d2h) relative to the latest snapshot |
-| `--keep-within-daily` | | duration (string) | — | optional | Keep daily snapshots newer than duration relative to the latest snapshot |
-| `--keep-within-hourly` | | duration (string) | — | optional | Keep hourly snapshots newer than duration relative to the latest snapshot |
-| `--keep-within-monthly` | | duration (string) | — | optional | Keep monthly snapshots newer than duration relative to the latest snapshot |
-| `--keep-within-weekly` | | duration (string) | — | optional | Keep weekly snapshots newer than duration relative to the latest snapshot |
-| `--keep-within-yearly` | | duration (string) | — | optional | Keep yearly snapshots newer than duration relative to the latest snapshot |
-| `--keep-yearly` | `-y` | int or `unlimited` | — | optional | Keep the last n yearly snapshots |
-| `--max-repack-size` | | size (string) | — | optional | Stop after repacking this much data in total (allowed suffixes: k/K, m/M, g/G, t/T) |
-| `--max-unused` | | limit (string) | `"5%"` | optional | Tolerate given limit of unused data (absolute value with suffixes, a value in %, or 'unlimited') |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--prune` | | bool | `false` | optional | Automatically run the 'prune' command if snapshots have been removed |
-| `--repack-cacheable-only` | | bool | `false` | optional | Only repack packs which are cacheable |
-| `--repack-small` | | bool | `false` | optional | Repack pack files below 80% of target pack size |
-| `--repack-smaller-than` | | below-limit (string) | — | optional | Pack below-limit packfiles (allowed suffixes: k/K, m/M) |
-| `--repack-uncompressed` | | bool | `false` | optional | Repack all uncompressed data |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-| `--unsafe-allow-remove-all` | | bool | `false` | optional | Allow deleting all snapshots of a snapshot group |
-
----
-
-### init
-
-**Description:** Initialize a new repository.
-
-**Usage:** `restic init [flags]`
-
-**Exit codes:** 0 = success, 1 = error.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--copy-chunker-params` | | bool | `false` | optional | Copy chunker parameters from the secondary repository (useful with the copy command) |
-| `--from-insecure-no-password` | | bool | `false` | optional | Use an empty password for the source repository (insecure) |
-| `--from-key-hint` | | string | `$RESTIC_FROM_KEY_HINT` | optional | Key ID of key to try decrypting the source repository first |
-| `--from-password-command` | | command (string) | `$RESTIC_FROM_PASSWORD_COMMAND` | optional | Shell command to obtain the source repository password from |
-| `--from-password-file` | | file (string) | `$RESTIC_FROM_PASSWORD_FILE` | optional | File to read the source repository password from |
-| `--from-repo` | | repository (string) | `$RESTIC_FROM_REPOSITORY` | optional | Source repository to copy chunker parameters from |
-| `--from-repository-file` | | file (string) | `$RESTIC_FROM_REPOSITORY_FILE` | optional | File from which to read the source repository location |
-| `--help` | `-h` | bool | `false` | optional | Help for init |
-| `--repository-version` | | string | `"stable"` | optional | Repository format version to use, allowed values are a format version, 'latest' and 'stable' |
-
----
-
-### key
-
-**Description:** Manage keys (passwords). This is a parent command with subcommands.
-
-**Usage:** `restic key [command]`
-
-**Subcommands:** `add`, `list`, `passwd`, `remove`
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for key |
-
----
-
-### key add
-
-**Description:** Add a new key (password) to the repository; returns the new key ID.
-
-**Usage:** `restic key add [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for add |
-| `--host` | | string | — | optional | The hostname for new key |
-| `--new-insecure-no-password` | | bool | `false` | optional | Add an empty password for the repository (insecure) |
-| `--new-password-file` | | file (string) | — | optional | File from which to read the new password |
-| `--user` | | string | — | optional | The username for new key |
-
----
-
-### key list
-
-**Description:** List keys (passwords) associated with the repository.
-
-**Usage:** `restic key list [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for list |
-
----
-
-### key passwd
-
-**Description:** Change key (password); creates a new key ID and removes the old key ID, returns new key ID.
-
-**Usage:** `restic key passwd [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for passwd |
-| `--host` | | string | — | optional | The hostname for new key |
-| `--new-insecure-no-password` | | bool | `false` | optional | Add an empty password for the repository (insecure) |
-| `--new-password-file` | | file (string) | — | optional | File from which to read the new password |
-| `--user` | | string | — | optional | The username for new key |
-
----
-
-### key remove
-
-**Description:** Remove key ID (password) from the repository. Cannot remove the current key being used to access the repository.
-
-**Usage:** `restic key remove [ID] [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `ID` | **required** | Key ID to remove |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for remove |
-
----
-
-### list
-
-**Description:** List objects in the repository based on type.
-
-**Usage:** `restic list [flags] [blobs|packs|index|snapshots|keys|locks]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| object type | **required** | One of: `blobs`, `packs`, `index`, `snapshots`, `keys`, `locks` |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for list |
-
----
-
-### ls
-
-**Description:** List files in a snapshot.
-
-**Usage:** `restic ls [flags] snapshotID [dir...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID` | **required** | Snapshot ID to list (special value `latest` supported) |
-| `dir ...` | optional | Absolute directory paths to filter listing (must start with `/`) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for ls |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host, when snapshot ID "latest" is given |
-| `--human-readable` | | bool | `false` | optional | Print sizes in human readable format |
-| `--long` | `-l` | bool | `false` | optional | Use a long listing format showing size and mode |
-| `--ncdu` | | bool | `false` | optional | Output NCDU export format (pipe into 'ncdu -f -') |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path, when snapshot ID "latest" is given |
-| `--recursive` | | bool | `false` | optional | Include files in subfolders of the listed directories |
-| `--reverse` | | bool | `false` | optional | Reverse sorted output |
-| `--sort` | `-s` | mode (string) | `name` | optional | Sort output by (name\|size\|time=mtime\|atime\|ctime\|extension) |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...], when snapshot ID "latest" is given |
-
----
-
-### migrate
-
-**Description:** Apply migrations to a repository. Lists available migrations if none specified.
-
-**Usage:** `restic migrate [flags] [migration name] [...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `migration name ...` | optional | Names of migrations to apply (if omitted, lists available migrations) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--force` | `-f` | bool | `false` | optional | Apply a migration a second time |
-| `--help` | `-h` | bool | `false` | optional | Help for migrate |
-
----
-
-### mount
-
-**Description:** Mount the repository via FUSE to a directory (read-only).
-
-**Usage:** `restic mount [flags] mountpoint`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `mountpoint` | **required** | Directory to mount the repository on |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--allow-other` | | bool | `false` | optional | Allow other users to access the data in the mounted directory |
-| `--help` | `-h` | bool | `false` | optional | Help for mount |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--no-default-permissions` | | bool | `false` | optional | For 'allow-other', ignore Unix permissions and allow users to read all snapshot files |
-| `--owner-root` | | bool | `false` | optional | Use 'root' as the owner of files and dirs |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--path-template` | | template (string, repeatable) | see note | optional | Set template for path names (can be specified multiple times). Default templates: `ids/%i`, `snapshots/%T`, `hosts/%h/%T`, `tags/%t/%T`. Patterns: `%i` short ID, `%I` long ID, `%u` username, `%h` hostname, `%t` tags, `%T` timestamp |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] |
-| `--time-template` | | template (string) | `"2006-01-02T15:04:05Z07:00"` | optional | Set template to use for times (Go time format) |
-
----
-
-### prune
-
-**Description:** Remove unneeded data from the repository.
-
-**Usage:** `restic prune [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--dry-run` | `-n` | bool | `false` | optional | Do not modify the repository, just print what would be done |
-| `--help` | `-h` | bool | `false` | optional | Help for prune |
-| `--max-repack-size` | | size (string) | — | optional | Stop after repacking this much data in total (allowed suffixes: k/K, m/M, g/G, t/T) |
-| `--max-unused` | | limit (string) | `"5%"` | optional | Tolerate given limit of unused data (absolute value with suffixes, a value in %, or 'unlimited') |
-| `--repack-cacheable-only` | | bool | `false` | optional | Only repack packs which are cacheable |
-| `--repack-small` | | bool | `false` | optional | Repack pack files below 80% of target pack size |
-| `--repack-smaller-than` | | below-limit (string) | — | optional | Pack below-limit packfiles (allowed suffixes: k/K, m/M) |
-| `--repack-uncompressed` | | bool | `false` | optional | Repack all uncompressed data |
-| `--unsafe-recover-no-free-space` | | string | — | optional | UNSAFE, READ THE DOCUMENTATION BEFORE USING! Try to recover a repository stuck with no free space. Do not use without trying out 'prune --max-repack-size 0' first. |
-
----
-
-### recover
-
-**Description:** Recover data from the repository not referenced by snapshots. Builds a new snapshot from all directories found in the raw data that are not referenced in an existing snapshot.
-
-**Usage:** `restic recover [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for recover |
-
----
-
-### repair
-
-**Description:** Repair the repository. This is a parent command with subcommands.
-
-**Usage:** `restic repair [command]`
-
-**Subcommands:** `index`, `packs`, `snapshots`
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for repair |
-
----
-
-### repair index
-
-**Description:** Build a new index based on the pack files in the repository.
-
-**Usage:** `restic repair index [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for index |
-| `--read-all-packs` | | bool | `false` | optional | Read all pack files to generate new index from scratch |
-
----
-
-### repair packs
-
-**Description:** Salvage damaged pack files. Extracts intact blobs from specified pack files, rebuilds the index, and removes the pack files from the repository.
-
-**Usage:** `restic repair packs [packIDs...] [flags]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `packIDs ...` | **required** | Pack IDs to repair |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for packs |
-
----
-
-### repair snapshots
-
-**Description:** Repair broken snapshots. Scans given snapshots and generates new ones with damaged directories and file contents removed.
-
-**Usage:** `restic repair snapshots [flags] [snapshot ID] [...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-**Warning:** Repairing and deleting broken snapshots causes data loss! It will remove broken directories and modify broken files. Depends on a correct index — run `repair index` first!
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshot ID ...` | optional | Specific snapshot IDs to repair (if omitted, uses filter flags to select) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--dry-run` | `-n` | bool | `false` | optional | Do not do anything, just print what would be done |
-| `--forget` | | bool | `false` | optional | Remove original snapshots after creating new ones |
-| `--help` | `-h` | bool | `false` | optional | Help for snapshots |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-
----
-
-### restore
-
-**Description:** Extract the data from a snapshot.
-
-**Usage:** `restic restore [flags] snapshotID`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID` | **required** | Snapshot ID to restore (special value `latest` supported; supports `snapshotID:subfolder` syntax) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--delete` | | bool | `false` | optional | Delete files from target directory if they do not exist in snapshot. Use '--dry-run -vv' to check what would be deleted |
-| `--dry-run` | | bool | `false` | optional | Do not write any data, just show what would be done |
-| `--exclude` | `-e` | pattern (string, repeatable) | — | optional | Exclude a pattern (can be specified multiple times) |
-| `--exclude-file` | | file (string, repeatable) | — | optional | Read exclude patterns from a file (can be specified multiple times) |
-| `--exclude-xattr` | | pattern (string, repeatable) | — | optional | Exclude xattr by pattern (can be specified multiple times) |
-| `--help` | `-h` | bool | `false` | optional | Help for restore |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host, when snapshot ID "latest" is given |
-| `--iexclude` | | pattern (string, repeatable) | — | optional | Same as --exclude but ignores the casing of filenames |
-| `--iexclude-file` | | file (string, repeatable) | — | optional | Same as --exclude-file but ignores casing of filenames in patterns |
-| `--iinclude` | | pattern (string, repeatable) | — | optional | Same as --include but ignores the casing of filenames |
-| `--iinclude-file` | | file (string, repeatable) | — | optional | Same as --include-file but ignores casing of filenames in patterns |
-| `--include` | `-i` | pattern (string, repeatable) | — | optional | Include a pattern (can be specified multiple times) |
-| `--include-file` | | file (string, repeatable) | — | optional | Read include patterns from a file (can be specified multiple times) |
-| `--include-xattr` | | pattern (string, repeatable) | — | optional | Include xattr by pattern (can be specified multiple times) |
-| `--overwrite` | | behavior (string) | `always` | optional | Overwrite behavior, one of (always\|if-changed\|if-newer\|never) |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path, when snapshot ID "latest" is given |
-| `--sparse` | | bool | `false` | optional | Restore files as sparse |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...], when snapshot ID "latest" is given |
-| `--target` | `-t` | string | — | **required** | Directory to extract data to |
-| `--verify` | | bool | `false` | optional | Verify restored files content |
-
----
-
-### rewrite
-
-**Description:** Rewrite snapshots to exclude unwanted files. Creates new snapshots with the excluded files removed.
-
-**Usage:** `restic rewrite [flags] [snapshotID ...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-**Note:** The special tag 'rewrite' will be added to new snapshots unless `--forget` is used.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID ...` | optional | Specific snapshot IDs to rewrite (if omitted, rewrites all matching snapshots) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--dry-run` | `-n` | bool | `false` | optional | Do not do anything, just print what would be done |
-| `--exclude` | `-e` | pattern (string, repeatable) | — | optional | Exclude a pattern (can be specified multiple times) |
-| `--exclude-file` | | file (string, repeatable) | — | optional | Read exclude patterns from a file (can be specified multiple times) |
-| `--forget` | | bool | `false` | optional | Remove original snapshots after creating new ones |
-| `--help` | `-h` | bool | `false` | optional | Help for rewrite |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--iexclude` | | pattern (string, repeatable) | — | optional | Same as --exclude but ignores the casing of filenames |
-| `--iexclude-file` | | file (string, repeatable) | — | optional | Same as --exclude-file but ignores casing of filenames in patterns |
-| `--new-host` | | string | — | optional | Replace hostname |
-| `--new-time` | | string | — | optional | Replace time of the backup |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--snapshot-summary` | `-s` | bool | `false` | optional | Create snapshot summary record if it does not exist |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-
----
-
-### snapshots
-
-**Description:** List all snapshots stored in the repository.
-
-**Usage:** `restic snapshots [flags] [snapshotID ...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID ...` | optional | Specific snapshot IDs to list (if omitted, lists all matching snapshots) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--compact` | `-c` | bool | `false` | optional | Use compact output format |
-| `--group-by` | `-g` | group (string) | — | optional | Group snapshots by host, paths and/or tags, separated by comma |
-| `--help` | `-h` | bool | `false` | optional | Help for snapshots |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--latest` | | int | — | optional | Only show the last n snapshots for each host and path |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-
----
-
-### stats
-
-**Description:** Scan the repository and show basic statistics.
-
-**Usage:** `restic stats [flags] [snapshot ID] [...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-**Modes:**
-- `restore-size` (default): Counts the size of the restored files
-- `files-by-contents`: Counts total size of unique files (unique by contents)
-- `raw-data`: Counts the size of blobs in the repository
-- `blobs-per-file`: Combination of files-by-contents and raw-data
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshot ID ...` | optional | Specific snapshot IDs to compute stats for (if omitted, uses all matching snapshots; `latest` supported) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for stats |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--mode` | | string | `"restore-size"` | optional | Counting mode: restore-size, files-by-contents, blobs-per-file or raw-data |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-
----
-
-### tag
-
-**Description:** Modify tags on existing snapshots. Can set/replace, add to, or remove from the tag set.
-
-**Usage:** `restic tag [flags] [snapshotID ...]`
-
-**Exit codes:** 0 = success, 1 = error, 10 = repo does not exist, 11 = repo already locked, 12 = incorrect password.
-
-#### Positional Arguments
-
-| Name | Required | Description |
-|------|----------|-------------|
-| `snapshotID ...` | optional | Specific snapshot IDs to modify (if omitted, modifies all matching snapshots) |
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--add` | | tags (string-list, repeatable) | `[]` | optional | Tags to add to existing tags in the format `tag[,tag,...]` (can be given multiple times) |
-| `--help` | `-h` | bool | `false` | optional | Help for tag |
-| `--host` | `-H` | host (string, repeatable) | `$RESTIC_HOST` | optional | Only consider snapshots for this host (can be specified multiple times) |
-| `--path` | | path (string, repeatable) | — | optional | Only consider snapshots including this (absolute) path |
-| `--remove` | | tags (string-list, repeatable) | `[]` | optional | Tags to remove from existing tags in the format `tag[,tag,...]` (can be given multiple times) |
-| `--set` | | tags (string-list, repeatable) | `[]` | optional | Tags to replace existing tags with in the format `tag[,tag,...]` (can be given multiple times) |
-| `--tag` | | tag[,tag,...] (string-list, repeatable) | `[]` | optional | Only consider snapshots including tag[,tag,...] (can be specified multiple times) |
-
----
-
-### unlock
-
-**Description:** Remove locks other processes created. By default only removes stale locks.
-
-**Usage:** `restic unlock [flags]`
-
-**Exit codes:** 0 = success, 1 = error.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for unlock |
-| `--remove-all` | | bool | `false` | optional | Remove all locks, even non-stale ones |
-
----
-
-## Advanced / Additional Commands
-
----
-
-### features
-
-**Description:** Print list of supported feature flags.
-
-**Usage:** `restic features [flags]`
-
-**Exit codes:** 0 = success, 1 = error.
-
-**Note:** Feature flags are controlled via the `RESTIC_FEATURES` environment variable (e.g. `featureA=true,featureB=false`). Feature states: alpha (disabled by default), beta (enabled by default), stable (always enabled), deprecated (always disabled).
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for features |
-
----
-
-### options
-
-**Description:** Print list of extended options.
-
-**Usage:** `restic options [flags]`
-
-**Exit codes:** 0 = success, 1 = error.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--help` | `-h` | bool | `false` | optional | Help for options |
-
----
-
-### generate
-
-**Description:** Generate manual pages and auto-completion files (bash, fish, zsh, powershell).
-
-**Usage:** `restic generate [flags]`
-
-**Exit codes:** 0 = success, 1 = error.
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-| Long | Short | Type | Default | Required | Description |
-|------|-------|------|---------|----------|-------------|
-| `--bash-completion` | | file (string) | — | optional | Write bash completion file (`-` for stdout) |
-| `--fish-completion` | | file (string) | — | optional | Write fish completion file (`-` for stdout) |
-| `--help` | `-h` | bool | `false` | optional | Help for generate |
-| `--man` | | directory (string) | — | optional | Write man pages to directory |
-| `--powershell-completion` | | file (string) | — | optional | Write powershell completion file (`-` for stdout) |
-| `--zsh-completion` | | file (string) | — | optional | Write zsh completion file (`-` for stdout) |
-
----
-
-### version
-
-**Description:** Print version information.
-
-**Usage:** `restic version`
-
-#### Positional Arguments
-
-None.
-
-#### Command-Specific Flags
-
-None (only global flags apply).
-
----
-
-## Quick Reference: Commands Requiring Positional Arguments
-
-| Command | Required Positional Args |
-|---------|------------------------|
-| `backup` | At least one source (FILE/DIR, --files-from*, or --stdin) |
-| `cat` | object type + ID |
-| `diff` | snapshotID snapshotID (exactly two) |
-| `dump` | snapshotID file (exactly two) |
-| `find` | PATTERN... (one or more) |
-| `key remove` | ID (exactly one) |
-| `list` | object type (exactly one) |
-| `ls` | snapshotID (exactly one) |
-| `mount` | mountpoint (exactly one) |
-| `repair packs` | packIDs... (one or more) |
-| `restore` | snapshotID (exactly one) |
-
-## Quick Reference: Required Flags
-
-| Command | Required Flags |
-|---------|---------------|
-| `restore` | `--target` (`-t`) — directory to extract data to |
-| `copy` | `--from-repo` (or `$RESTIC_FROM_REPOSITORY`) — source repository |
-| All commands needing repo access | `--repo` (`-r`) or `$RESTIC_REPOSITORY` (or `--repository-file` / `$RESTIC_REPOSITORY_FILE`) |
-| All commands needing repo access | A password source: interactive prompt, `--password-file`, `--password-command`, or `$RESTIC_PASSWORD` |