RESTIC-DUMP(1)

πŸ’– restic-dump β€” bestie's guide to yeeting files out of a snapshot πŸ’–

okay so real talk, this page is from the restic backup(1) manual family, and it's about the dump command. no cap, it's lowkey one of the most useful things in restic and nobody talks about it. let's get into it ✨


🌸 NAME 🌸

restic-dump β€” print backed-up files or folders to stdout. like, literally just spit them out. that's the whole job. iconic behaviour honestly.


πŸŽ€ SYNOPSIS πŸŽ€

restic dump [flags] snapshotID file

πŸ¦‹ DESCRIPTION πŸ¦‹

so the dump command extracts files from a snapshot in the repository. slay.

if you pick a single file, it prints that file's contents straight to stdout. boom. done.

if you pick a folder, it gets output as a tar (that's the default, bestie) or a zip file containing the contents of the specified folder. so you get an archive back.

and if you want the whole entire snapshot as an archive file? just pass / as the file name. that's it. main character move.

the special snapshotID latest is your bestie here β€” use it to grab the latest snapshot in the repository. no need to remember a big long hex string, we love convenience.

and okay, this one's a little ✨spicy✨: to include the folder content at the root of the archive, you can use the snapshotID:subfolder syntax, where subfolder is a path within the snapshot tree as shown by restic ls. so like, if you don't want a bunch of nested folders in your tar, this is the way. iykyk.


πŸ’€ EXIT STATUS πŸ’€

here's the vibe check on how it bails out:

  • exit status is 0 if the command was successful πŸŽ‰
  • 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 πŸ’…

  • -a, --archive="tar" β€” set the archive format as "tar" or "zip". pick your fighter.
  • -h, --help[=false] β€” help for dump. your little emergency handbook.
  • -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)
  • --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). yes bestie, all of them.
  • --tag=[] β€” only consider snapshots including tag[,tag,...], when snapshot ID latest is given (can be specified multiple times)
  • -t, --target="" β€” write the output to target path. so instead of stdout, it goes to a file. obsessed.

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

these ones come from the big restic parent command, but they still work here and they still matter, so we're listing every single one, periodt:

  • --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)
bestie. insecure. it literally says insecure in the name. do not do this unless you truly know what you're doing. 🚨
  • --insecure-tls[=false] β€” skip TLS certificate verification when connecting to the repository (insecure)
again with the insecure flag 😭 it's right there in the name, it is not being subtle.
  • --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)

🌈 SEE ALSO 🌈

  • restic(1) β€” the mothership. go read it, bestie.

that's the whole page, no notes, you ate that πŸ’…βœ¨

this lil guide was generated by restic generate back in Jan 2017, and it lives under the restic backup(1) manual name. love that for us. πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from