5

I want to exclude backup of proxy media in Final Cut Pro. This media is located in:

~/Movies/Final Cut Events/[Event Folder]/Transcoded Media/Proxy Media

Problem is, when I create a new [Event Folder] it creates a new directory named "Proxy Media" which has to be manually omitted from Time Machine each time. I'd like to automate this process.

I've looked at tmutil in the command line, but I don't think that will do it.

5

You could save a property list like this as ~/Library/LaunchAgents/excludefinalcut.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>EnableGlobbing</key>
  <true/> <!-- enable wildcard and tilde expansion for ProgramArguments -->
  <key>Label</key>
  <string>excludefinalcut</string>
  <key>ProgramArguments</key>
  <array>
    <string>tmutil</string>
    <string>addexclusion</string>
    <string>~/Movies/Final Cut Events/*/Transcoded Media/Proxy Media</string>
  </array>
  <key>WatchPaths</key>
  <array>
    <string>~/Movies/Final Cut Events</string>
  </array>
</dict>
</plist>

Then load the plist by running launchctl load ~/Library/LaunchAgents/excludefinalcut.plist.

tmutil addexclusion gives files a com.apple.metadata:com_apple_backup_excludeItem extended attribute. sudo tmutil addexclusion -p would add files to the SkipPaths dictionary in /Library/Preferences/com.apple.TimeMachine.plist that is also modified by System Preferences.

  • 1
    Note: as of MacOS 10.10, the EnableGlobbing flag no longer works. But, you can achieve something similar by putting your tmutil command inside a shell script file, and then from the launch agent plist above, simply use the command bash, with program arguments -c and then the path to your script file. A wildcard inside the script's tmutil command will be properly respected and expanded. – Nate Apr 22 '18 at 4:09

You must log in to answer this question.

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