3 ms·
tmutil verifychecksums should already do this.
by RJIb8RBYxzAMX9u 10y ago
tmutil verifychecksums should already do this.
- n1000 10y agoAs far as I understand it, this will verify checksums within the time machine backup by comparing hashes with the ones that were created during backup. However, it will not compare the files against the ones on the system. So it protecte against bitrot on the backup disk only.
- RJIb8RBYxzAMX9u 10y agoWell, you'll need some kind of heuristic to figure out if a mismatch is due to bit-rot, or because the working file's changed. Maybe modification date, but a) what if a file's restored from an older backup, b) mtime itself is corrupted (APFS would guard against this I suppose). In any case, the "hash" appears to be CRC32, stored in extended attributes: $ xattr .inputrc com.apple.finder.copy.source.checksum#N com.apple.metadata:_kTimeMachineNewestSnapshot com.apple.metadata:_kTimeMachineOldestSnapshot $ xattr -px 'com.apple.finder.copy.source.checksum#N' .inputrc 26 E5 4A AB $ cksum .inputrc 2873812262 65 .inputrc $ printf '%x\n' "$(cksum .inputrc | cut -d ' ' -f 1)" ab4ae526