RESTIC-RESTORE(1)

✨ NAME ✨

hiii bestie πŸ’– welcome to restic-restore, one glorious page inside the restic backup(1) manual. this one is all about pulling your data back out of a snapshot β€” like un-archiving your whole life, but cute. πŸŽ€

  • restic-restore β€” extract the data from a snapshot 🌸

πŸ¦‹ SYNOPSIS πŸ¦‹

restic restore [flags] snapshotID

πŸ’… DESCRIPTION πŸ’…

so the restore command does exactly what it says on the tin, no cap: it extracts the data from a snapshot out of the repository and drops it into a directory. that's the whole vibe. πŸ”₯

and bestie, the special snapshotID latest is right there for you β€” use it to restore the latest snapshot in the repository. main character energy, honestly. πŸ‘‘

want just one subfolder instead of the whole tree? iconic, you can do that with the snapshotID:subfolder syntax, where subfolder is a path inside the snapshot tree, exactly as restic ls shows it to you. 🧚

one lil technical note so you're not surprised: POSIX ACLs are always restored by their numeric value, while file ownership can optionally be restored by name instead of numeric value. periodt. πŸ’œ

🌈 EXIT STATUS 🌈

she tells you how it went through the exit status, so let's read the room:

  • exit status is 0 if the command was successful β€” slay ✨
  • exit status is 1 if there was any error 😭
  • exit status is 10 if the repository does not exist πŸ’€
  • exit status is 11 if the repository is already locked πŸ”’
  • exit status is 12 if the password is incorrect πŸ™ˆ

πŸŽ€ OPTIONS πŸŽ€

okay here's the whole menu, every single one, no skips:

  • --delete[=false] β€” delete files from target directory if they do not exist in snapshot. Use '--dry-run -vv' to check what would be deleted
  • --dry-run[=false] β€” do not write any data, just show what would be done
  • -e, --exclude=[] β€” exclude a pattern (can be specified multiple times)
  • --exclude-file=[] β€” read exclude patterns from a file (can be specified multiple times)
  • --exclude-xattr=[] β€” exclude xattr by pattern (can be specified multiple times)
  • -h, --help[=false] β€” help for restore
  • -H, --host=[] β€” only consider snapshots for this host, when snapshot ID latest is given (can be specified multiple times, use empty string to unset default value) (default: $RESTIC_HOST)
  • --iexclude=[] β€” same as --exclude pattern but ignores the casing of filenames
  • --iexclude-file=[] β€” same as --exclude-file but ignores casing of filenames in patterns
  • --iinclude=[] β€” same as --include pattern but ignores the casing of filenames
  • --iinclude-file=[] β€” same as --include-file but ignores casing of filenames in patterns
  • -i, --include=[] β€” include a pattern (can be specified multiple times)
  • --include-file=[] β€” read include patterns from a file (can be specified multiple times)
  • --include-xattr=[] β€” include xattr by pattern (can be specified multiple times)
  • --overwrite=always β€” overwrite behavior, one of (always|if-changed|if-newer|never)
  • --ownership-by-name[=false] β€” restore file ownership by user name and group name (except POSIX ACLs)
  • --path=[] β€” only consider snapshots including this (absolute) path, when snapshot ID latest is given (can be specified multiple times, snapshots must include all specified paths)
  • --sparse[=false] β€” restore files as sparse
  • --tag=[] β€” only consider snapshots including tag[,tag,...], when snapshot ID latest is given (can be specified multiple times)
  • -t, --target="" β€” directory to extract data to
  • --verify[=false] β€” verify restored files content

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

these come from the parent command, they're 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 like 5m or 2h (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-password and --insecure-tls literally say (insecure) in their own descriptions. they mean it. don't be the girl who skips the fine print. 🚨

🌟 SEE ALSO 🌟


and that's the whole page, you ate it πŸ’… go restore something and feel powerful.

πŸ“ this page was generated by restic generate, dated Jan 2017, and it lives in the restic backup(1) manual β€” love that for us. bye bestie, mwah πŸ’–βœ¨
πŸ“¦ where this page comes from