Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I couldn't get my TimeMachine backup to restore, so I just used rsync. What are the flags I should use? I just used:

rsync -av /path/to/backup /path/to/restore

Can it be that simple?

My backup was on a USB disk, which appears to have preserved the disk structure. Does TM still do that multiple hard-links to files/dirs to save space? Does that affect what flags I should use.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It's not that simple as the Time Machine may or may not store the files in a flat folder structure. Network backups are stored as a sparse disk image and furthermore rsync doesn't respect all the ACL and permissions that are possible or deal with special permissions on the User folder, user subfolders, Applications and other special cases.

If you can narrow down which files are being copied and confirm your machine directory is not stored in a disk image, rsync might be acceptable in limited circumstances to copy user files that lack special permissions.

In your specific instance - the files are indeed hard linked which will not make any difference to rsync. When you point rsync at a specific instance in time on your backup - it doesn't really matter how many other hard or soft links point at the files you are restoring. The storage system will read the data from the external drive just as if the files were the only copy on the USB drive. That's the magic of hard links - two directory entries point to the same file so that you can't tell when reading the file that it's a link or a file. Only if you query the link count can a program tell, and rsync cares not about the hard link count when reading.

You should be good to go for any restore of files like documents or pictures.

share|improve this answer
    
Thanks @bmike I edited my question based on your answer. –  Rich Homolka Sep 13 '12 at 20:01

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.