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

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:tips_n_tricks:restic.html [28.04.2021 10:56 CEST] – [Find broken files] peterdocs:tips_n_tricks:restic.html [28.04.2021 12:19 CEST] (current) – [restic] peter
Line 1: Line 1:
 ====== restic ====== ====== restic ======
-{{entry>restic}}{{tag>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> 
 + 
 +===== 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> </code>
  
docs/tips_n_tricks/restic.html.1619600167.txt.gz · Last modified: 28.04.2021 10:56 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki