brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tmutil verifychecksums checks a backup against the checksums saved at backup time

Backup
~/tips/tip-macos-tmutil-verifychecksums

tmutil verifychecksums /path/to/backup-item

Compares backup data with the checksums Time Machine recorded when it was written.

A backup that exists is not the same as a backup that is intact. tmutil verifychecksums can tell the difference for Time Machine data.

tmutil verifychecksums /path/to/backup-item

It computes checksums of the backup data and compares them with the ones recorded at backup time. Silence is good news: no output means everything matches. A ! in front of a path means the current checksum doesn’t match the recorded one, and ? means the recorded checksum itself is invalid.

The caveat is age. Checksums have been recorded since OS X 10.11, and they are not computed after the fact for files that earlier releases copied. Older backups can’t be fully verified this way.

You can pass several paths. Point it at a folder inside a backup rather than the whole disk if you just want a spot check, since it has to read all that data. The man page also says tmutil may need Full Disk Access on the backup disk.

I’d pair it with a normal verify routine: this command only compares checksums, it does not restore anything. A clean run tells you the stored data still matches what was written, which is the thing most people worry about with an external disk that has been spinning for years.

Further reading: tmutil man page (ss64 copy)

More Backup tips restic snapshots --group-by host,paths mysqldump --routines --events mydb > mydb.sql rsync -a --files-from=list.txt /home/me/ backup:/backup/ restic find "*.txt" restic stats All Backup tips (45) All topics

Link