$ restic --help restic is a backup program which allows saving multiple revisions of files and directories in an encrypted repository stored on different backends.
Usage: restic [command]
Available 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 diff Show differences between two snapshots dump Print a backed-up file to stdout find Find a file or directory 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 restore Extract the data from a snapshot snapshots List all snapshots stats Count up sizes and show information about repository data tag Modify tags on snapshots unlock Remove locks other processes created version Print version information
Flags: --cacert file file to load root certificates from (default: use system certificates) --cache-dir string set the cache directory. (default: use system default cache directory) --cleanup-cache auto remove old cache directories -h, --help help for restic --json set output mode to JSON for commands that support it --key-hint string key ID of key to try decrypting first (default: $RESTIC_KEY_HINT) --limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited) --limit-upload int 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 key=value set extended option (key=value, can be specified multiple times) -p, --password-file string read the repository password from a file (default: $RESTIC_PASSWORD_FILE) -q, --quiet do not output comprehensive progress report -r, --repo string repository to backup to or restore from (default: $RESTIC_REPOSITORY) --tls-client-cert string path to a file containing PEM encoded TLS client certificate and private key -v, --verbose n[=-1] be verbose (specify --verbose multiple times or level n)
Use "restic [command] --help" for more information about a command.
Flags: -e, --exclude pattern exclude a pattern (can be specified multiple times) --exclude-caches excludes cache directories that are marked with a CACHEDIR.TAG file. See http://bford.info/cachedir/spec.html for the Cache Directory Tagging Standard --exclude-file file read exclude patterns from a file (can be specified multiple times) --exclude-if-present stringArray 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) --files-from string read the files to backup from file (can be combined with file args/can be specified multiple times) -f, --force force re-reading the target files/directories (overrides the "parent" flag) -h, --help help for backup --hostname hostname set the hostname for the snapshot manually. To prevent an expensive rescan use the "parent" flag -x, --one-file-system exclude other file systems --parent string use this parent snapshot (default: last snapshot in the repo that has the same target files/directories) --stdin read backup from stdin --stdin-filename string file name to use when reading from stdin (default "stdin") --tag tag add a tag for the new snapshot (can be specified multiple times) --time string time of the backup (ex. '2012-11-01 22:08:41') (default: now) --with-atime store the atime for all files and directories
Global Flags: --cacert file file to load root certificates from (default: use system certificates) --cache-dir string 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 string key ID of key to try decrypting first (default: $RESTIC_KEY_HINT) --limit-download int limits downloads to a maximum rate in KiB/s. (default: unlimited) --limit-upload int 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 key=value set extended option (key=value, can be specified multiple times) -p, --password-file string read the repository password from a file (default: $RESTIC_PASSWORD_FILE) -q, --quiet do not output comprehensive progress report -r, --repo string repository to backup to or restore from (default: $RESTIC_REPOSITORY) --tls-client-cert string path to a file containing PEM encoded TLS client certificate and private key -v, --verbose n[=-1] be verbose (specify --verbose multiple times or level n)
$ restic -r sftp:root@192.168.1.100:/home/mike/backup prune enter password for repository:
counting files in repo building new index for repo [0:00] 100.00% 22 / 22 files repository contains 22 packs (8512 blobs) with 100.092 MiB bytes processed 8512 blobs: 0 duplicate blobs, 0B duplicate load all snapshots find data that is still in use for 1 snapshots [0:00] 100.00% 1 / 1 snapshots found 8433 of 8512 data blobs still in use will rewrite 3 packs creating new index [0:00] 86.36% 19 / 22 files saved new index as 544a5084 done