13

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.

2
  • possible duplicate of On Lion, what files are excluded by rule from a Time Machine backup? - The time machine exclusions are implemented in a way slightly more complicated than one list.
    – bmike
    Commented Dec 12, 2011 at 15:07
  • No, it isn't a dupe as "Time Machine exclusions entered in its Options dialogue" refers to the exclusions entered by the user. Helpful link nonetheless... Commented Dec 12, 2011 at 18:57

4 Answers 4

17

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

5
  • Cool question and answer. Have you tried to edit that file, and if so, what happened?
    – ICL1901
    Commented Dec 12, 2011 at 12:50
  • On a fresh OS X Lion installation: moved com.apple.TimeMachine.plist and com.apple.TimeMachine.plist.lockfile then copied com.apple.TimeMachine.plist from a system backup (Snow Leopard). Then enabled and configured TimeMachine. Bingo! Commented Dec 12, 2011 at 19:36
  • @David DelMonte, me I didn't dare to edit the file. Commented Dec 12, 2011 at 19:37
  • It is a strange thing, but on my Maverick /Library/Preferences/com.apple.TimeMachine.plist looks like binary file. How could I edit it? Commented Feb 6, 2014 at 10:05
  • @AntonEgorov that is a separate question - ask how to edit a binary plist file (Apple's default is now binary I think)
    – mmmmmm
    Commented Feb 6, 2014 at 11:02
11

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.

3

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

2
  • Does this find the text in binary plists?
    – mmmmmm
    Commented Dec 27, 2014 at 14:07
  • 1
    If you do -exec plutil -convert xml1 && grep -l "Phrase" {} \; it will convert the file to an XML plist first. You could also look into using PlistBuddy -c Print Commented Dec 29, 2014 at 14:49
0

You can use plutil or /usr/libexec/PlistBuddy to view and modify the plist file where the paths are stored:

plutil -extract SkipPaths xml1 -o - /Library/Preferences/com.apple.TimeMachine.plist

or

/usr/libexec/PlistBuddy -c 'print SkipPaths' /Library/Preferences/com.apple.TimeMachine.plist

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .