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 forlsπ«Ά (your emotional support flag)-H,--host=[]β only consider snapshots for this host, when snapshot IDlatestis 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.2Ginstead 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 intoncdu -f -)--path=[]β only consider snapshots including this (absolute) path, when snapshot IDlatestis 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 includingtag[,tag,...], when snapshot IDlatestis 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 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)
π 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
- 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