5 Replies Latest reply: Nov 4, 2011 2:32 PM by Pondini
Mechanist Level 1 Level 1 (0 points)

At some point I told Time Machine to get rid of backups of a particular file using the "Delete all backups of ..." option. Time Machine duly deleted the backups of the file and stopped making new ones.

 

I've since changed my mind but I can't figure out how to get Time Machine to start backing up the file again. I know the old backups are gone, that's fine, but I want to start getting new backups.

 

The file is not in the exclusions list in Time Machine preferences.

 

Renaming the file isn't an option-- this file is used by a certain app that expects it to have a specific name.

 

Any ideas?


iMac, Mac OS X (10.7.2)
  • Pondini Level 8 Level 8 (38,720 points)

    Mechanist wrote:

     

    At some point I told Time Machine to get rid of backups of a particular file using the "Delete all backups of ..." option. Time Machine duly deleted the backups of the file and stopped making new ones.

    Not exactly.  It did delete the existing backups, but didn't make any new ones because the file hasn't changed since then.

     

    The easiest way to get it to back it up is to make a minor change to it (the name or something in the contents), then change it back.  Time Machine should back it up on the next backup.

     

    Alternatively, you need to force a "deep scan," where Time Machine compares everything on your system to the backups.  Usually, just starting up from your Recovery HD will do that, although sometimes you have to start from it and Repair your internal HD to trigger it. 

     

    If you're not sure how to do that, see Using the Recovery HD and/or #6 in Using Disk Utility.

  • Mechanist Level 1 Level 1 (0 points)

    Actually the file has changed since then. The file changes nearly every day, and Time Machine runs normally, but the file continues not being backed up. I could try a deep scan but since Time Machine seems to be intentionally ignoring the file (at my request of course) I'm not sure it would be worthwhile.

  • Pondini Level 8 Level 8 (38,720 points)

    Mechanist wrote:

     

    Actually the file has changed since then. The file changes nearly every day, and Time Machine runs normally, but the file continues not being backed up

    Then it should have been backed-up.

     

    Was it ever excluded?  The preferences file (where the exclusions are kept) may be damaged;  try a "full reset" of Time Machine, per #A4 in Time Machine - Troubleshooting.

     

    Are there other files in the same folder?  If so, do they get backed-up when they're changed?  If there aren't any, put a small test file there, run a backup, and see if it gets backed-up.  That will tell us if the folder itself is damaged, which happens rarely.

     

    I could try a deep scan but since Time Machine seems to be intentionally ignoring the file (at my request of course) I'm not sure it would be worthwhile.

    No, when you delete all backups, that's a one-time thing; it does not (or should not) prevent future backups when the file changes.

  • Mechanist Level 1 Level 1 (0 points)

    The file in question was never on the exclusion list in Time Machine preferences.

     

    Other files in the same folder get backed up normally.

     

    In fact Time Machine did mark this file for exclusion from future backups-- if I try an "ls -l@" on the file, I see that it has an extended attribute called "com.apple.metadata:com_apple_backup_excludeItem". I can guarantee that I did not add that manually, so it would appear that deleting backups of a file does in fact cause Time Machine to exclude the file from future backups.

     

    I'm probably going to try removing that manually, but I find it pretty surprising there's no UI to undo this.

  • Pondini Level 8 Level 8 (38,720 points)

    Mechanist wrote:

    . . .

    In fact Time Machine did mark this file for exclusion from future backups-- if I try an "ls -l@" on the file, I see that it has an extended attribute called "com.apple.metadata:com_apple_backup_excludeItem".

    What sort of file is this?  There are a very few that are excluded automatically that way, mostly in the iPhoto and iTunes Libraries -- a couple are an iPod cache in the iPhoto Library, and the XML index in iTunes, as I recall.

     

    How that got on that file is a mystery;  telling Time Machine to delete it's backups won't do it, and excluding it via TM Prefs > Options won't, either.

     

    Effective with Lion, there are two types of exclusions.  Take a look at the addexclusion and removeexclusion verbs in the new tmutil command.  I've not experimented with them, so don't know for sure, but I suspect the location-independent exclusion may be the one with the extended attribute.

     

    If not, you should be able to remove that attribute with the xattr or removexattr commands, although I've never fooled with that, either.