0

I have recently done a clean install of El Capitan, having backed up files on Time Machine. However, there is something wrong with the time machine backup: when I enter time machine it won't list the old backup, only the one that I did after the clean install. (I think there's a problem with the drive I'm using.) However, the files are all there, so I can copy them to my hard drive using the cp command in the terminal.

However, if I try

cp -r /Volumes/TimeMachine/.../Documents/* Documents

all the files appear with today's time stamp, which is not very helpful.

If on the other hand I enter

cp -pr /Volumes/TimeMachine/.../Documents/* Documents

I get the correct time stamps, but I also get the level of protection that Time Machine has - which is to say I can't edit anything I copied!

Does anyone know whether there's a way to preserve time stamps, but not this extreme level of protection?

Thanks

  • rsync (although you might need a newer one than that in OS X) will do this sort of thing – user151019 Oct 19 '15 at 19:03
  • Thanks Mark - which of the many options should I use with rsync for this effect? (I have the homebrew version installed). – JamesM Oct 20 '15 at 10:38
  • I think rsync -aA (and -v to see what happens) – user151019 Oct 20 '15 at 10:44
  • Wonderful! - but I used rsync -atv as -t perserves the time stamp (there's no -A that I can see in the man page). Thanks again Mark. – JamesM Oct 20 '15 at 13:53
  • -A is on of the reasons for a new version - it keeps ACLs – user151019 Oct 20 '15 at 15:56
1

A way to copy files which can deal with interruptions etc, that is it will not copy something that has not changed is to use rsync

OS X comes with an old version and it is best to get a newer one from macports, homebrew etc. This can copy ACLs and there is a bug in the OS X one (that is in one of my other answers her or SU or SO)

The simple copy is (the directory Documents to the current directory)

rsync -rtlA /Volumes/TimeMachine/.../Documents .

-a does several other parameters (-rlptgoD ) -A copies the ACLs -r recurses into directories, -t preservers modification times, -l copies symlinks as simlinks

0

If you restore files using the Time Machine interface, it preserves permissions and dates properly. Also, using finder might be preferable to cp in this case as well.

When I have problems locating files from the GUI, here's what I do.

  1. Remove all my Time Machine destinations - this doesn't delete any backups, but it lets the Time Machine menu icon to show the "Browse" other backups so that I can be 100% sure I'm checking the correct backup destination.
  2. Use the go to folder Finder shortcut in Time Machine - Shift + Control + G - then paste the folder where you want to "browse" in the backup.
  • If I understand the OP correctly they can't access old time slices via the TM GUI. – nohillside Oct 19 '15 at 18:45
  • @patrix Thanks for seeing that. I've edited in some details that hopefully hit that target as well. Hopefully whatever damage has happened to the backup drive isn't such that it's rendered these files unreachable. – bmike Oct 19 '15 at 18:53
  • Thanks bmike (and patrix) - I am able like this to access the files, but I still don't know how to copy them while (a) preserving the time stamp, but (b) not preserving the 'custom access'. – JamesM Oct 20 '15 at 13:47
  • I managed with rsync -atv as suggested by Mark above. – JamesM Oct 20 '15 at 15:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .