Last active
June 10, 2019 23:28
-
-
Save ftclausen/922baef65508e24e1c86656e2ab1e4cf to your computer and use it in GitHub Desktop.
List restic files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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