Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problems after doing full restore with Time Machine

If I reinstall Leopard and and do a complete restore with time Machine, I have to erase my Time Machine backup drive and do a complete TM backup from scratch because TM will not pick up where it left off doing incremental backups. It wants to start over like it's never done any backups at all. It's a pain because it take me 4 or 5 hours to back up 270 GB. I've had to do this twice so far because once I had a problem with my startup drive and just today I made an external hard drive with leopard and restored all my files via TM.

Is there anyway to get out of starting over from scratch when I do a full restore with TM ?

2.4 GHz Intel Core 2 Duo 24" IMac, Mac OS X (10.5.1), 3 GB DDR2 SDRAM

Posted on Dec 25, 2007 8:38 PM

Reply
Question marked as Best reply

Posted on Dec 25, 2007 9:46 PM

The following procedure works for me if your restore happens to be from the last backup that Time Machine completed. (I'm not sure if it would work just as well if you restore from an older point in the Time Machine history -- but it certainly should!):

After you complete the full restore (which will force a Restart when it completes), log in and then immediately go to System Preferences / Time Machine and Turn Off Time Machine to prevent any premature additional backups.

Now go to System Preferences / Spotlight / Privacy and drag the icons for all your hard drives (including your main hard drive and the Time Machine hard drive) from the Desktop into the Privacy list. This will stop Spotlight indexing of all these drives to speed things up for what follows. You will do the indexing later (see below).

If you have any sort of automatic virus protection active, disable it at this point to speed up what follows.

Then Restart again (to get things into a fresh state), and then immediately do a Repair Permissions for your main hard drive (using Applications / Utilities / Disk Utility). Be patient. This will take 30 minutes or more and the progress bar may not advance until the very end. Do not be alarmed when several hundred notifications come up, as most of them are minor tidying up items, but some are significant. For example, you will see the ownership get adjusted for every help file in every language for every Lexar printer the system knows about (minor). You will also see the permissions adjusted for the root directory of your main hard drive (significant).

And all of these permission and ownership repairs will happen EVEN THOUGH the files you backed up into your Time Machine may have had no such problems. They are, apparently, a result of the method that Time Machine uses to rebuild your file system during the restore.

When the permission repair eventually completes, Quit Disk Utility and Shut Down the computer.

Now reset the Parameter memory (PRAM). PRAM holds copies of certain system settings for rapid access. To do this, hold down the 4 keys Apple-Option-P-R continuously and press and release the power button. When you hear the SECOND startup chime, release those 4 keys. The system will continue to boot up normally. This makes sure the system's Parameter memory is in sync with the System Preferences resulting from the restore you just completed. It probably would have been anyway, but this makes sure. Among other things, this makes sure the system takes proper note of your "computer name" (System Preferences / Sharing) which is crucial to Time Machine's ability to recognize and use your previous backup database on the Time Machine hard drive.

Now log in and fire up Mail to let it automatically finish the restore of its mailboxes by importing the necessary mail lists. Quit Mail when it finishes.

If you have any other, application specific tasks to perform to complete the restore for any other applications, now is the time to do them.

Finally, go back into System Preferences / Spotlight / Privacy, select the line showing your main hard drive in the list, and click the "-" on the bottom to remove it from the list. Repeat this for every other hard drive EXCEPT for your Time Machine hard drive. Exit System Preferences. Spotlight will now begin to re-index those hard drives from scratch. Watch this by clicking on the Spotlight icon in the menu bar. Wait for indexing to finish.

Your restore is now at the point where you can let Time Machine do a new backup.

I suggest you Restart again to get things into a fresh state (not truly necessary, but it is what I do). Then go into System Preferences / Time Machine and, at long last, Turn On Time Machine again. Then do a Back Up Now (right click on the Time Machine icon in the dock and select Back Up Now from the pop up menu).

Because of the restore, Time Machine will now do a Deep Traversal of your entire file system looking for EVERYTHING that has changed compared to the last backup on its hard drive (rather than depending on the file system transaction logs as it normally does to make incremental backups happen much faster). The "Preparing" stage for this will take a long time -- about as long as a Repair Permissions pass in Disk Utility. Eventually Time Machine will start transferring files. This will be a backup of significant size because all the permissions repairs you did above, etc., count as changes as far as Time Machine is concerned, not to mention that certain portions of the file system are rebuilt during the restore. But it should be WELL SHORT of actually doing a complete backup of everything on your system. I.e., it is just a particularly large, but nevertheless incremental, backup added on to the previous stuff on your Time Machine disk.

Crucial to this is that Time Machine recognizes the prior database on its hard drive as applying to your computer. Thus the permissions repair and PRAM resetting steps above.

When that backup eventually completes, go into System Preferences / Spotlight and remove your Time Machine drive from the Privacy list. Exit System Preferences and wait for Spotlight to finish re-indexing your Time Machine drive.

Restart once again, just to get things into a fresh state, and then re-enable any antivirus "live protection" stuff you disabled above.

You are done.

From this point on, Time Machine should do "normal" incremental backups, and the previous history of Time Machine backups should be accessible and used by Time Machine just as before.
--Bob

Message was edited by: BobP1776
16 replies
Question marked as Best reply

Dec 25, 2007 9:46 PM in response to James Brizendine

The following procedure works for me if your restore happens to be from the last backup that Time Machine completed. (I'm not sure if it would work just as well if you restore from an older point in the Time Machine history -- but it certainly should!):

After you complete the full restore (which will force a Restart when it completes), log in and then immediately go to System Preferences / Time Machine and Turn Off Time Machine to prevent any premature additional backups.

Now go to System Preferences / Spotlight / Privacy and drag the icons for all your hard drives (including your main hard drive and the Time Machine hard drive) from the Desktop into the Privacy list. This will stop Spotlight indexing of all these drives to speed things up for what follows. You will do the indexing later (see below).

If you have any sort of automatic virus protection active, disable it at this point to speed up what follows.

Then Restart again (to get things into a fresh state), and then immediately do a Repair Permissions for your main hard drive (using Applications / Utilities / Disk Utility). Be patient. This will take 30 minutes or more and the progress bar may not advance until the very end. Do not be alarmed when several hundred notifications come up, as most of them are minor tidying up items, but some are significant. For example, you will see the ownership get adjusted for every help file in every language for every Lexar printer the system knows about (minor). You will also see the permissions adjusted for the root directory of your main hard drive (significant).

And all of these permission and ownership repairs will happen EVEN THOUGH the files you backed up into your Time Machine may have had no such problems. They are, apparently, a result of the method that Time Machine uses to rebuild your file system during the restore.

When the permission repair eventually completes, Quit Disk Utility and Shut Down the computer.

Now reset the Parameter memory (PRAM). PRAM holds copies of certain system settings for rapid access. To do this, hold down the 4 keys Apple-Option-P-R continuously and press and release the power button. When you hear the SECOND startup chime, release those 4 keys. The system will continue to boot up normally. This makes sure the system's Parameter memory is in sync with the System Preferences resulting from the restore you just completed. It probably would have been anyway, but this makes sure. Among other things, this makes sure the system takes proper note of your "computer name" (System Preferences / Sharing) which is crucial to Time Machine's ability to recognize and use your previous backup database on the Time Machine hard drive.

Now log in and fire up Mail to let it automatically finish the restore of its mailboxes by importing the necessary mail lists. Quit Mail when it finishes.

If you have any other, application specific tasks to perform to complete the restore for any other applications, now is the time to do them.

Finally, go back into System Preferences / Spotlight / Privacy, select the line showing your main hard drive in the list, and click the "-" on the bottom to remove it from the list. Repeat this for every other hard drive EXCEPT for your Time Machine hard drive. Exit System Preferences. Spotlight will now begin to re-index those hard drives from scratch. Watch this by clicking on the Spotlight icon in the menu bar. Wait for indexing to finish.

Your restore is now at the point where you can let Time Machine do a new backup.

I suggest you Restart again to get things into a fresh state (not truly necessary, but it is what I do). Then go into System Preferences / Time Machine and, at long last, Turn On Time Machine again. Then do a Back Up Now (right click on the Time Machine icon in the dock and select Back Up Now from the pop up menu).

Because of the restore, Time Machine will now do a Deep Traversal of your entire file system looking for EVERYTHING that has changed compared to the last backup on its hard drive (rather than depending on the file system transaction logs as it normally does to make incremental backups happen much faster). The "Preparing" stage for this will take a long time -- about as long as a Repair Permissions pass in Disk Utility. Eventually Time Machine will start transferring files. This will be a backup of significant size because all the permissions repairs you did above, etc., count as changes as far as Time Machine is concerned, not to mention that certain portions of the file system are rebuilt during the restore. But it should be WELL SHORT of actually doing a complete backup of everything on your system. I.e., it is just a particularly large, but nevertheless incremental, backup added on to the previous stuff on your Time Machine disk.

Crucial to this is that Time Machine recognizes the prior database on its hard drive as applying to your computer. Thus the permissions repair and PRAM resetting steps above.

When that backup eventually completes, go into System Preferences / Spotlight and remove your Time Machine drive from the Privacy list. Exit System Preferences and wait for Spotlight to finish re-indexing your Time Machine drive.

Restart once again, just to get things into a fresh state, and then re-enable any antivirus "live protection" stuff you disabled above.

You are done.

From this point on, Time Machine should do "normal" incremental backups, and the previous history of Time Machine backups should be accessible and used by Time Machine just as before.
--Bob

Message was edited by: BobP1776

Dec 26, 2007 11:01 AM in response to BobP1776

Bob, thank you so much for posting such detailed and complete information on how to get Time Machine to recognize its backups after doing a restore. I posted a request to Feedback requesting a Knowledge Base article containing this information and linked to this thread and mentioned your post. I would very much encourage others to do the same.
http://www.apple.com/macosx/feedback/

Jan 4, 2008 1:11 AM in response to BobP1776

bobp1776, many thanks for your informative post. if only i had known before.....

but seriously:
*apple cannot leave this TM problem as it is*, a remedy has to be found and a patch has to be distributed urgently. otherwise TM will loose a big part of its functionality and users would have to make bootable clones as before with tiger e.g. using CCC or superduper.

Jan 9, 2008 7:30 AM in response to BobP1776

Hi BobP

Sadly i found your information after i had done a clean install and restore from my TM drive.

To be fair, it has restored me perfectly to my previous state, however when i turned on TM again, it backed up the whole hard drive again, so now i have no room on my TM drive, even though it is twice the size of my original HD. I assumed that as it was restoring from the TM drive it would be clever enough to know not to back up the whole thing again.

I assume that i can delete the original first ever back up but will loose any deleted files once i do that? Is it just tough luck that once you do a full restore from TM it effectively means you have to start TM again, hence loosing any old backups?

Since doing the full restore i have only let TM do the one big back up and not connected the drive since. What would you recommend to do from here?

Many Thanx in advance of any help you can provide.

Mark B

Jan 30, 2008 6:24 PM in response to James Brizendine

I had the same problem, but with a different root cause. I'm just tossing it out here in the hopes that if it happens to someone else it might be helpful.

My Powerbook just had the motherboard replaced (the infamous lower memory slot failure issue). Nothing helped... not even BobP1776's excellent advice. After the restore (I didn't want to send my book for service with personal data on it!) Time Machine refused to recognize the original backup directory and kept trying to create a new one.

While checking the file permissions I ran the xattr command. On both the old and new backup folders there was a file attribute called com.apple.backupd.BackupMachineAddress, which Lo and Behold was set on the old directory to the MAC address of the network port of my original motherboard. The new directory that Time Machine kept creating was set to... no surprise... the MAC address of the new board!

Trying to fix the attribute gave me permission errors. It was those darn ACL's. A quick Google search on the attribute name sent me here: http://davidleber.net/?p=288

So I removed the ACL's on Backup.backupdb and Backup.backupdb/mycomputer using "chmod -N directory", fixed the attribute with "xattr -w com.apple.backupd.BackupMachineAddress 01:02:03:04:05:06 Backup.backupdb/mycomputer" using the MAC address from the en0 section of the ifconfig output in place of 01:02:03:04:05:06. I restored the ACL's with "chmod +a 'group:everyone deny add file,delete,add_subdirectoy,deletechild,writeattr,writeextattr,chown' Backup.backupdb Backup.backupdb/mycomputer" which you can check with "ls -led".

And now my Time Machine is working again. <gasp>

Jan 31, 2008 6:18 PM in response to Quaboag

I expect TM restore to be a simple affair, had a problem and I restored from a few days back. It took awhile and by the time I returned to the computer, an error message saying I didn't have enough space on my drive (didn't jot down exact wording). Since then, I was not able to use number of programs including Stuffit, my account settings, after a restore from my CD, things got a little bit better, but still not perfect.
I'm no geek like more of you guys here, nor time to sort it all out. I would have been better off not having to rely on the Time Machine, as I have been running my OSX upgraded from machine to machine without any major problem, until I was trying to take advantage of the 'WONDERFUL' stupid new technology.

BTW, I did call my local Apple support, they were advising me to do a complete backup of my HD, a complete restore using the info from the backup drive. Then what use is the Time Machine data?

Feb 13, 2008 3:13 PM in response to Quaboag

I have exactly the same problem as you have. My iMac just hat the motherboard replaced, too. Since then, TM doesn't recognize its old backups.
I guess I could fix the problem doing exactly the steps you mentioned. But unfortunately I am not as experienced with ACL and terminal commands.
Can you or someone else give me step by step instructions?

Thanks!

Mar 4, 2008 1:08 PM in response to BobP1776

Thanks for your effort Bob !

but unfortunately your instructions didn't solve my problem.

I had a TM backup from my older MBP and I recently got a new MBP. I successfully restored all my data onto the new MBP. However, the new MBP wouldn't continue on to the same backups that existed on the disk from my old MBP. This is because TM uses the MAC address to identify backups for a particular computer. The same problem happens when you change your mother board or ethernet card on a mac.

here's what solved my problem in less than 2 minutes !

http://www.macosxhints.com/article.php?story=20080128003716101

hope this helps !

May 15, 2008 12:28 AM in response to arorap

I just successfully went through the steps in the referenced article ( http://www.macosxhints.com/article.php?story=20080128003716101). I'm on a loaner laptop while my laptop is in for repairs and I'll probably have to go through the steps again when I get it back (on the assumption that the motherboard is replaced). Anyway, just wanted to let folks know that this process has worked for others. Just be very careful as you type.

As a slightly ironic aside, the graphic that contains the crucial commands did not display properly in Safari--the text at the start of the long third command was garbled. I pasted the link into FireFox and saw the full command line. Also, read through the comments about how to enter names in the command line when the name contains spaces. For example, if your backup hard drive is named "Time Machine" (note the space between the two words) then the name would be entered as Time\ Machine (note the backslash + space combo). Other spaces in the command--such as spaces between the command name and command options--are entered normally. To paraphrase the old carpenter's advice, "read everything twice and then type once."

Now, if only my Mac comes back from the MacDoc as a 2.6GHz + 200GB drive model because Apple ran out of old motherboards....

Jun 6, 2008 5:18 AM in response to James Brizendine

This full-backup-after-restore is an interesting (and irritating) effect, for sure. (It just happened to me today, after a disk crash.) While noting that some posts here have got around the problem by some detailed "hacking", here's a -theory- about why it's actually what you should expect. (A disclaimer: I do not know the inner mechanisms of Time Machine or HFS filesystems in particular; but I do have a lot of experience in how these things work in general. So I'm proposing the following as an exercise, in fact just for fun.)

(1) The normal situation seems to be that changes to files are logged, and aggregated directory-by-directory. When a backup begins, this log is scanned, and a list of possibly-changed directories is assembled. Their total size is what TM announces is "requested". It then scans those directories in detail to see which files within them actually changed, and copies over only those. Thus the overall time is roughly proportional to the total size of the files actually changed.

(2) Every so often TM feels it must do a "deep traversal" (eg if you had a crash, or it's been a long time since you backed up to this particular TM volume, so that the file-change log has overflowed and "can't be trusted"). In this case TM must check your whole file system to see which files have changed; and again it copies only those. But finding which files those are is a much longer process, involving scanning every file "header" and so it takes about the same time eg as repairing permissions. (In my case, with about 60GB that's 15 minutes or so.)

(3) The question is, though, how it determines whether a file is changed. If you're curious about what was actually copied in a particular backup, you can do a "diff -qr" on the latest and just-before-that backup directories, and you'll get a list of changed files. It's -very- fast, so some optimisation for "are these files the same" is going on. I suspect it uses the (modern version of) i-number and modification date for this, and does not compare the actual data. That is, it the two files have the same i-number and same modification date, then (it concludes, reasonably) they have the same contents. (I know that same i-number on its own would have been enough in the older systems; but the newer ones use something more complex.)

(4) Now when you've done a full restore, it'll be over a wiped disk and, although the same directory structure, file names and contents will come over from the backup, the i-numbers (again, I know HFS uses a more elaborate version of these, but it's a similar idea) will probably -not- be reproduced, as they have only a logical function that is not visible to the ordinary user. (In the original UNIX file system every file was assigned a new and unique i-number at creation time, and the function of directories was to translate the user-assigned file name to the system-assigned i-number. The modern file systems do something similar I expect.)

(5) Thus to do an incremental backup after a full restore, if the above is anywhere near the mark, TM would have to read the -data- of all the files. And that takes literally hours, maybe twice as long as the initial TM backup (or indeed the restore) takes, since -two- copies of the entire file system must be read and compared, byte-by-byte.

(6) So maybe Apple decided that doing an "ab initio" backup was the better course: faster (about half the time of (5) though in no sense "fast"), and actually safer since the reason you did a restore was -supposed- to be that your file system got screwed and therefore it's better to make a fresh start.

(7) What's happened, though, is that people have used the restore facility eg to copy a small drive to a bigger one, ie not after a crash, and they are righty dismayed that the "policy" Apple took for efficiency in (6) is not appropriate for them.

( Actually for me, I'm very happy to get my data back at all! )

Carroll

Problems after doing full restore with Time Machine

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.