User Tools

Site Tools


docs:tips_n_tricks:restic.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docs:tips_n_tricks:restic.html [28.04.2021 10:48 CEST] – created peterdocs:tips_n_tricks:restic.html [28.04.2021 12:19 CEST] (current) – [restic] peter
Line 1: Line 1:
 ====== restic ====== ====== restic ======
 +{{entry>restic}}{{entry>backup}}
 +{{tag>restic backup}}
 ===== Find broken files ===== ===== Find broken files =====
  
 <code bash> <code bash>
 find /restic/repo -type f -not -name config -exec sha256sum '{}' ';' | tee restic_repo.sha256 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 "OK: $sum  $file" ; else echo "NOT MATCHING: $sum  $file" ; break ; fi ; done+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
 </code> </code>
 +
 +===== Check single packs =====
 +
 +<code text>
 + ~ $ restic cat --no-cache pack 9fb60fb52b491d778c25c20c2b6cdf45b444c6de32618c80303aed3a9995f5bd | sha256sum
 +Warning: hash of data does not match ID, want
 +  9fb60fb52b491d778c25c20c2b6cdf45b444c6de32618c80303aed3a9995f5bd
 +got:
 +  32fe80fa9516fcf7ad177b8d1a985567210fdb844dbe83fc93e18c4a44f8c420
 +32fe80fa9516fcf7ad177b8d1a985567210fdb844dbe83fc93e18c4a44f8c420  -
 + ~ $
 +</code>
 +
 +__References__:
 +
 +  * [[https://github.com/restic/restic/issues/1999|Hash does not match id during prune #1999]]
 +
docs/tips_n_tricks/restic.html.1619599721.txt.gz · Last modified: 28.04.2021 10:48 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki