Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How do I make Time Machine to make a new complete backup without losing older versions of backed up files?

Verbose:

I am using the Time Machine backup on my OS X (Snow Leopard) to backup the whole computer to an external drive. I especially like the "history", i.e. the feature that allows you to restore the older version of a file.

Problem: I had some data corruption on my external backup drive, I repaired it with the System Tool for doing that, it found some faults. I had the disk tool repair the external drive. After that, the external drive was OK and I could use Time Machine again.

I let Time Machine do one more backup.

Now I made a verification according to Verifying Time Machine backups,

namely along

sudo diff -qr . $HOME/Desktop 2>&1 | tee $HOME/timemachine-diff.log

However: After doing the command above, several differences and missing files were reported, approx. 200 files in sum.

Whereas some of the missing files were cache or excluded directories, the differences do bother me, especially as some important documents from me are listed as differing.

How can I make sure that the data on the external drive is synced correctly?

  • Is it possible to have Time Machine to do a complete new backup without losing the history?

  • Or to have Time Machine compare all files for differences and re-write all files that are different?

  • Or can I set some flags on the files that do not match to have them copied again? (like the archive-flag in Windows/Dos). I'd rather not touch the files because I would like to keep the date of last change/date of creation)

Thank you for your thoughts!

share|improve this question
    
I just noticed a warning in some Apple support document: Note: Do not repair the disk image with Disk Utility. I'm not sure what that implies though... See also Frost's new answer at the question you referenced. –  Arjan Jul 12 '10 at 19:43

1 Answer 1

Time Machine uses FSEvents to tell in which directories files were added, changed or deleted after a certain time. (There's a good explanation at Ars Technica.) Even when somehow forcing OS X to rebuild the FSEvents database, I think Time Machine will still only consider changes that happened after the date of the last backup. I think it simply assumes all older backups are valid, and discards older files as it assumes it already copied them.

Even if FSEvents tells Time Machine that something in a folder has changed, a nice in-depth article at Quarter Life Crisis claims:

Time Machine considers two files to be identical if their path and dates and size are the same.

Hence, modifying a file while not changing file size or date, keeps Time Machine oblivious of file changes. But maybe that only applies to comparing the last backup against the current state on disk. If you do not see the file in the last backup at all, then Time Machine cannot compare the current file to the last backup either. Or, if the folder has not changed for a long time, then Time Machine will skip it altogether. So, maybe you just need to make Time Machine process that file's folder again. Simply add a file to that same folder and remove it, which will add the name of that folder to the FSEvents database. Then, when Time Machine runs, it will surely know that the folder needs processing. If it then only looks at files that were created after the last backup then this won't help you. But maybe it really checks the existence of each file in that folder, hence copying the missing files to the backup after all. Just give it a try.

If just poking the folder doesn't work, then all you can do is change the file date. If you're okay with that, then the touch command can do that:

touch my-file
share|improve this answer
    
Thank you for giving some background information on Time Machine. Using touch might be a solution although I'd rather keep the date of change being correct. That time machine is only looking for a change in time + size seems a bit odd to me - I would have preferred them to use a file hash. –  usermac75 Jul 11 '10 at 13:54
    
Just taking the timestamp (which normally should change) and file size into account is a lot faster of course. So if OS X is indeed only considering those two, then I assume that's the reason. –  Arjan Jul 12 '10 at 19:45
    
@Usermac, I rewrote my answer, as maybe Time Machine does in fact compare all files dates and size if it knows a folder has changed. If so, then maybe all you need to do is make TM process that folder again. –  Arjan Jul 12 '10 at 20:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.