Compare two localsnapshots in APFS

Hi folks,


Is there a way to `compare` (diff) the current disk content with a given tmutil localsnapshot?

I found the compare verb in tmutil requires a snapshot path, but the localsnapshot is invisible to file system.


Thanks!

Replies

Yes, use this technique to mount your local snapshots and then you can use your diff tool of choice:


https://apple.stackexchange.com/questions/344681/macos-mojave-local-snapshots

Not sure if you ever found an answer, but I am looking for one. I didn't find an direct solution, so I decided to give mounting the snapshot and using tmutil compare a try. I was able to mount a snapshot locally using
Code Block
mount_apfs -o ro -s com.apple.TimeMachine.2021-05-16-012603.local /System/Volumes/Data /tmp/snap

but tmutil still won't diff the snapshot with my local disk. For example, I tried
Code Block
tmutil compare com.apple.TimeMachine.2021-05-16-012603.local

and tmutil complained,
Code Block
Must specify a snapshot root when performing a machine comparison.

So, then I tried
Code Block
tmutil compare com.apple.TimeMachine.2021-05-16-012603.local /System/Volumes/Data

and now tmutil is says
Code Block
Must specify at least one item inside a backup.


I haven't been able to get past this. Does tmutil simply not support comparing to local snapshots?

OS: macOS Big Sur 11.3.1

You need to enable Full Disk Access for Terminal to have "tmutil compare" work. If you just run "tmutil compare" bare it should do something, or, it will error out saying you need full disk access.

But I found when trying to pass in snapshots and paths it never told me about the full disk access requirement and just gave the errors like "Must specify at least one item inside a backup" etc.