ls

Section profile.ls

This section configures restic command ls . Information on command and flags is copied from the restic manual pages.

The “ls” command lists files and directories in a snapshot.

The special snapshot ID “latest” can be used to list files and directories of the latest snapshot in the repository. The –host flag can be used in conjunction to select the latest snapshot originating from a certain host only.

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. Any directory paths specified must be absolute (starting with a path separator); paths use the forward slash ‘/’ as separator.

Flags used by resticprofile only:
NameTypeDefaultNotes
run-afterone or more stringsRun shell command(s) after a successful restic command
run-after-failone or more stringsRun shell command(s) after failed restic or shell commands
run-beforeone or more stringsRun shell command(s) before a restic command
run-finallyone or more stringsRun shell command(s) always, after all other commands
Flags passed to the restic command line:
NameTypeDefaultNotes
hosttrue / false OR one or more hostnamesonly consider snapshots for this host, when snapshot ID “latest” is given (can be specified multiple times) (default: $RESTIC_HOST). Boolean true is replaced with the hostname of the system. Examples: true, false, "host"
human-readabletrue / falsefalseprint sizes in human readable format. restic >= 0.16.0
longtrue / falsefalseuse a long listing format showing size and mode
ncdutrue / falsefalseoutput NCDU export format (pipe into ’ncdu -f -’). restic >= 0.17.0
pathtrue / false OR one or more stringsonly consider snapshots including this (absolute) path, when snapshot ID “latest” is given (can be specified multiple times, snapshots must include all specified paths). Boolean true is replaced with the paths from section “backup”. Examples: true, false, "path"
recursivetrue / falsefalseinclude files in subfolders of the listed directories
tagtrue / false OR one or more stringsonly consider snapshots including tag[,tag,…], when snapshot ID “latest” is given. Boolean true is replaced with the tags from section “backup”. Examples: true, false, "tag"
Tip

Flags declared for the restic command line in section profile can be overridden in this section.