RESTIC-LS(1)

✨ RESTIC-LS ✨

okay bestie, this is the manual page for restic-ls from the restic suite β€” yes, the restic backup(1) family, we're all one big happy group chat here πŸ’–


🌸 NAME 🌸

restic-ls β€” list files in a snapshot πŸ“‚βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

restic ls [flags] snapshotID [dir...]

πŸ’… DESCRIPTION πŸ’…

The ls command lists files and directories in a snapshot. literally just, here's what's inside, go off πŸ‘‘

The special snapshot ID latest can be used to list files and directories of the latest snapshot in the repository. and the --host flag can be used in conjunction with that, to select the latest snapshot originating from a certain host only. the way that combo works together?? iconic 🀝

File listings can optionally be filtered by directories. any positional arguments after the snapshot ID are interpreted as absolute directory paths, and only files inside those directories will be listed. If the --recursive flag is used, then the filter will allow traversing into matching directories' subfolders. lowkey important: any directory paths specified must be absolute (starting with a path separator) 🚨 and paths use the forward slash / as separator. not a backslash, bestie. forward slash. periodt.

File listings can be sorted by specifying --sort followed by one of the sort specifiers (name|size|time=mtime|atime|ctime|extension). and the sorting can be reversed by specifying --reverse β€” flip it, turn it, reverse it πŸ”„


🌈 EXIT STATUS 🌈

vibe check on how it went:

  • 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 πŸŽ€

  • -h, --help[=false] β€” help for ls 🫢 (your emotional support flag)
  • -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)
  • --human-readable[=false] β€” print sizes in human readable format, so like, 4.2G instead of a number that makes your eyes cross ✨
  • -l, --long[=false] β€” use a long listing format showing size and mode πŸ‘€
  • --ncdu[=false] β€” output NCDU export format (pipe into ncdu -f -)
  • --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)
  • --recursive[=false] β€” include files in subfolders of the listed directories πŸͺ†
  • --reverse[=false] β€” reverse sorted output πŸ”ƒ
  • -s, --sort=name β€” sort output by (name|size|time=mtime|atime|ctime|extension)
  • --tag=[] β€” only consider snapshots including tag[,tag,...], when snapshot ID latest is given (can be specified multiple times) 🏷️

🧚 OPTIONS INHERITED FROM PARENT COMMANDS 🧚

these came from the parent command, they're not ls-specific but they're still yours, bestie, use them wisely 🫢

  • --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) ⚠️
okay so this one is literally labeled insecure in the docs. no cap. it's giving "I know what I'm doing" but also "do I". proceed with your whole chest and your eyes open.
  • --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)

πŸ’œ SEE ALSO πŸ’œ

the whole restic cinematic universe, go read it πŸ“


and that's the whole page, bestie πŸŽ€ this cutie was generated by restic generate back in Jan 2017, so if you see it out here thriving in the wild, that's the origin story. slay, restic-ls. you ate πŸ’…βœ¨

πŸ“¦ where this page comes from