RESTIC-BACKUP(1)
π restic backup(1) β the manual, but make it cute π
okay bestie, gather round, because this is the page for restic backup from the restic manual and it's literally the most important one. no cap.
β¨ NAME β¨
restic-backup β Create a new backup of files and/or directories π«Ά
β¨ SYNOPSIS β¨
restic backup [flags] [FILE/DIR] ...
β¨ DESCRIPTION β¨
So here's the vibe: the backup command creates a new snapshot and saves the files and directories you handed it as arguments. that's it. that's the whole job. iconic behavior honestly. π
β¨ EXIT STATUS β¨
the exit codes are giving "read the room", so let's respect them:
0β slay, the command was successful β1β fatal error, and bestieβ¦ no snapshot was created π3β some source data could not be read, so you get an incomplete snapshot (it still got created, but it's missing stuff) π10β the repository does not exist π11β the repository is already locked π12β the password is incorrect π«
β¨ OPTIONS β¨
-n,--dry-run[=false]β don't upload or write any data, just show you what would be done. a little window-shopping moment ποΈ-e,--exclude=[]β exclude a pattern (can be specified multiple times)--exclude-caches[=false]β excludes cache directories that are marked with aCACHEDIR.TAGfile. 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=[]β takesfilename[:header], exclude contents of directories containing filename (except filename itself) if header of that file is as provided (can be specified multiple times)--exclude-larger-than=""β max size of the files to be backed up (allowed suffixes:k/K,m/M,g/G,t/T)--files-from=[]β read the files to backup from file (can be combined with file args; can be specified multiple times)--files-from-raw=[]β read the files to backup from file (can be combined with file args; can be specified multiple times)--files-from-verbatim=[]β read the files to backup from file (can be combined with file args; can be specified multiple times)-f,--force[=false]β force re-reading the source files/directories (overrides the"parent"flag)-g,--group-by=host,pathsβ group snapshots by host, paths and/or tags, separated by comma (disable grouping with'')-h,--help[=false]β help for backup-H,--host=""β set the hostname for the snapshot manually (default:$RESTIC_HOST). To prevent an expensive rescan use the"parent"flag--iexclude=[]β same as--excludepattern but ignores the casing of filenames--iexclude-file=[]β same as--exclude-filebut ignores casing of filenames in patterns--ignore-ctime[=false]β ignore ctime changes when checking for modified files--ignore-inode[=false]β ignore inode number and ctime changes when checking for modified files--no-scan[=false]β do not run scanner to estimate size of backup-x,--one-file-system[=false]β exclude other file systems, don't cross filesystem boundaries and subvolumes--parent=""β use this parent snapshot (default: latest snapshot in the group determined by--group-byand not newer than the timestamp determined by--time)--read-concurrency=0β read n files concurrently (default:$RESTIC_READ_CONCURRENCYor2)--skip-if-unchanged[=false]β skip snapshot creation if identical to parent snapshot--stdin[=false]β read backup from stdin--stdin-filename="stdin"β filename to use when reading from stdin--stdin-from-command[=false]β interpret arguments as command to execute and store its stdout--tag=[]β add tags for the new snapshot in the formattag[,tag,...](can be specified multiple times)--time=""β time of the backup (ex.'2012-11-01 22:08:41') (default: now)--with-atime[=false]β store the atime for all files and directories
β¨ OPTIONS INHERITED FROM PARENT COMMANDS β¨
these ones come from the parent command, so they're likeβ¦ the family heirlooms π
--cacert=[]β file to load root certificates from (default: use system certificates or$RESTIC_CACERT)--cache-dir=""β set the cache directory. (default: use system default cache directory)--cleanup-cache[=false]β auto remove old cache directories--compression=autoβ compression mode (only available for repository format version 2), one of (auto|off|fastest|better|max) (default:$RESTIC_COMPRESSION)--http-user-agent=""β set a http user agent for outgoing http requests--insecure-no-password[=false]β use an empty password for the repository, must be passed to every restic command (insecure) π¨--insecure-tls[=false]β skip TLS certificate verification when connecting to the repository (insecure) π¨--json[=false]β 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=0β limits downloads to a maximum rate in KiB/s. (default: unlimited)--limit-upload=0β limits uploads to a maximum rate in KiB/s. (default: unlimited)--no-cache[=false]β do not use a local cache--no-extra-verify[=false]β skip additional verification of data before upload (see documentation)--no-lock[=false]β do not lock the repository, this allows some operations on read-only repositories-o,--option=[]β set extended option (key=value, can be specified multiple times)--pack-size=0β set target pack size in MiB, created pack files may be larger (default:$RESTIC_PACK_SIZE)--password-command=""β shell command to obtain the repository password from (default:$RESTIC_PASSWORD_COMMAND)-p,--password-file=""β file to read the repository password from (default:$RESTIC_PASSWORD_FILE)-q,--quiet[=false]β do not output comprehensive progress report-r,--repo=""β repository to backup to or restore from (default:$RESTIC_REPOSITORY)--repository-file=""β file to read the repository location from (default:$RESTIC_REPOSITORY_FILE)--retry-lock=0sβ retry to lock the repository if it is already locked, takes a value like5mor2h(default: no retries)--stuck-request-timeout=5m0sβ duration after which to retry stuck requests--tls-client-cert=""β path to a file containing PEM encoded TLS client certificate and private key (default:$RESTIC_TLS_CLIENT_CERT)-v,--verbose[=0]β be verbose (specify multiple times or a level using `--verbose=n```, max level/times is 2)
β οΈ heads up bestie:--insecure-no-passwordand--insecure-tlsliterally have "insecure" in the name for a reason. do not come crying to me later. π
β¨ SEE ALSO β¨
that's the whole page, you ate that. π
this one was generated by restic generate, back in Jan 2017, and it's the restic backup(1) page, mwah. bye bestie, go back up your stuff πΈβ¨π¦
π¦ where this page comes from
- arch rolling: restic 0.19.1-1 Β· BSD
- epel 10: restic 0.19.1-1.el10_3 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0
- epel 9: restic 0.19.1-1.el9 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0
- fedora 43: restic 0.19.1-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0
- fedora 44: restic 0.19.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0
- nixpkgs unstable: restic 0.19.1
- ubuntu stonking: restic 0.19.1-1ubuntu1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms