Skip to content

Instantly share code, notes, and snippets.

@ftclausen
Last active June 10, 2019 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftclausen/922baef65508e24e1c86656e2ab1e4cf to your computer and use it in GitHub Desktop.
Save ftclausen/922baef65508e24e1c86656e2ab1e4cf to your computer and use it in GitHub Desktop.
List restic files
# List all files in all restic snapshots
repo="sftp:example.com:/path/to_repo"
passwd_file="/tmp/pw"
restic -r $repo --password-file $passwd_file snapshots -c | awk '/^[0-9a-f]{8}/ {print $1}' | while read -r snap; do
restic -r $repo --password-file $passwd ls $snap
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment