How to use checksum to find corrupt files periodically?

Created by Germar
Keywords:
crontab checksum
Last updated by:
Germar

Starting with 1.0.28 there is a new command line option '--checksum' which will do the same as 'Use checksum to detect changes' in Options. It will calculate checksums for both the source and the last snapshots files and will only use this checksum to decide whether a file has change or not (normal mode is to compare files modification time and size which is lot faster).

Because this takes ages you may want to use this only on Sundays or only the first Sunday per month. Please deactivate the schedule for your profile in that case. Then run 'crontab -e'

For daily snapshots on 2AM and '--checksum' every Sunday add:
#min hour day month dayOfWeek command
0 2 * * 1-6 nice -n 19 ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1
0 2 * * Sun nice -n 19 ionice -c2 -n7 /usr/bin/backintime --checksum --backup-job >/dev/null 2>&1

For '--checksum' only at first Sunday per month add:
#min hour day month dayOfWeek command
0 2 * * 1-6 nice -n 19 ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1
0 2 * * Sun [ "$(date '+\%d')" -gt 7 ] && nice -n 19 ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1
0 2 * * Sun [ "$(date '+\%d')" -le 7 ] && nice -n 19 ionice -c2 -n7 /usr/bin/backintime --checksum --backup-job >/dev/null 2>&1

Press CTRL+O to save and CTRL+X to exit.