This article explores how CrashPlan and OS X use metadata to determine which files to exclude from your backup, and demonstrates how to change the metadata of a file so that it will be included in your backup.
Metadata is data about data. A good example of metadata is the file creation date. When saving a file on your hard drive, your computer automatically records information about when the file was created. You don't manually say, “I created this on 3/19/99 at 12:00pm.” Your computer does it for you.
iTunes movie rentals are a great example of how metadata works with CrashPlan backups. If you have included your iTunes folder in your backup selection, then any changes to that folder, such as adding or removing files or creating or changing playlists, are automatically backed up to CrashPlan.
A movie rental is a large file (usually 1 - 2 GB) that is automatically deleted after 24 hours. If you back it up, it won't play after 24 hours anyway. Basically, it's a complete waste of time to back up.
That's where metadata comes in. To avoid unnecessary backups, iTunes attaches metadata to each movie rental file that says, “Don't back this up.” CrashPlan is smart enough to note the request and ignore the file.
Any program on OS X can tag any file with the “Don't back this up” metadata. Generally, programs like iTunes know best when it comes to identifying which files should be backed up and which ones shouldn't. However, there may be times when you want to override the existing metadata in order to include a file for back up that is excluded by default. Read on to learn how.
Finding out what is being excluded from your backup based on metadata is easy, but requires interaction with the OS X command line. To find out which files are being excluded on your system, enter the following line in Terminal:
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
This command queries spotlight to tell you every file that has the metadata “com_apple_backup_excludeItem” which means, “Don't back this up.”
For this example, let's assume you see a file named "windows.vmdk" in the list of metadata backup exclusions, and that you do actually want to make sure that file is backed up by CrashPlan. To change the metadata on the file and enable back up, enter the following in Terminal:
xattr -d com.apple.metadata:com_apple_backup_excludeItem windows.vmdk #This removes the meta data from vmdk file sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'" #Check again to make sure it's gone
Now CrashPlan knows to back up the windows.vmdk file. In fact, other backup software will also note that change, so if you happen to also be using Time Machine, Time Machine would start backing up the file as well.
Adding metadata to stop files from being backing up isn't necessary; if you no longer wish to back up a file, simply remove it from your backup file selection.