Where does Time Machine store its settings?
I'm looking for the file that contains all the Time Machine exclusions entered in its Options
dialogue. I know that (some of?) the scheduling related settings are stored in the com.apple.backupd-*.plist
files at /System/Library/LaunchDaemons
but I haven't been able to find the exclusions.
It is in the root directory of the actual backup e.g. /Volumes/Back3/Backups.backupdb/flat/Latest/.exclusions.plist
for a machine called flat but that only shows what happened.
More usefully - if you want to edit things see /Library/Preferences/com.apple.TimeMachine.plist
I got the informatiuon from this blog
The list of folders in System Preferences is stored in /Library/Preferences/com.apple.TimeMachine.plist
.
/System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist
contains folders that are excluded by default.
sudo mdfind com_apple_backup_excludeItem==com.apple.backupd
searches for files with a com.apple.metadata:com_apple_backup_excludeItem
extended attribute.
tmutil addexclusion
adds an extended attribute. sudo tmutil addexclusion -p
adds the path to /Library/Preferences/com.apple.TimeMachine.plist
.
Protip: (ugh) If you want to find the corresponding preference file on the file system for a system preference or application preference setting, I use this trick:
I makeup a word that would never possibly exist on my system (usually horrible offensive) something like "ShittleCheezeman"
Then I edit the preference that I want to track down and write that word into one of the preference settings that accepts a string or phrase and save the preference setting.
Then, right after that; I run something like:
sudo find / -name "*.plist" -mmin -10 -exec grep -l "ShittleCheezeman" {} \;
That will search every plist file on the whole system that has been modified in the last 10 minutes and list the one that contains the unique phrase. Or you might be able to use spotlight though I find it to be an unreliable software as most database-backed desktop apps tend to be