User Tools

Site Tools


docs:tips_n_tricks:restic.html

restic

Find broken files

find /restic/repo -type f -not -name config -exec sha256sum '{}' ';' | tee restic_repo.sha256
cat restic_repo.sha256| while read sum file ; do if [ "$sum" != "${file##*/}" ] ; then echo "NOT MATCHING: $sum  $file" ; fi ; done
# # To gain confidence in method/syntax:
# cat restic_repo.sha256| while read sum file ; do if [ "$sum" = "${file##*/}" ] ; then echo "OK: $sum  $file" ; else echo "NOT MATCHING: $sum  $file" ; break ; fi ; done

Check single packs

 ~ $ restic cat --no-cache pack 9fb60fb52b491d778c25c20c2b6cdf45b444c6de32618c80303aed3a9995f5bd | sha256sum
Warning: hash of data does not match ID, want
  9fb60fb52b491d778c25c20c2b6cdf45b444c6de32618c80303aed3a9995f5bd
got:
  32fe80fa9516fcf7ad177b8d1a985567210fdb844dbe83fc93e18c4a44f8c420
32fe80fa9516fcf7ad177b8d1a985567210fdb844dbe83fc93e18c4a44f8c420  -
 ~ $

References:

docs/tips_n_tricks/restic.html.txt · Last modified: 28.04.2021 12:19 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki