0

I got into a problem were a large number of my raw photos have been deleted over time but I'm pretty sure they are on my time machine backup, but manually using OSX timewarp UI to go and find these files are going to take ages.

Is there a way to just restore all files named .CR2 from the full time machine history so I do not need to do it manually ?

Journeyman Geek
  • 127,463
  • 52
  • 260
  • 430

1 Answers1

1

Sure, you could mount the sparsebundle and run something like

find /Volumes/mySparsebundle/ -iname \*.CR2

to get a list of them all, but beware that you could see lots of entries for the same file, because it will appear as if it exists in multiple backups. There's really only one copy of the file's bytes in the sparsebundle, but that filename appears in multiple places through the magic of hardlinks.

You could then take that list and write script to remove duplicate entries for the same file, and then use the resulting de-duplicated list as input to a script that calls cp to copy those files from the sparsebundle onto another volume.

Spiff
  • 101,729
  • 17
  • 175
  • 229
  • Thanks - I realized shortly after posting that I could indeed access the files under /Volumes via the terminal. With respect to duplicate files then that is less of an issue since the CR2 files was never changed, always just master copies so I can just ignore the duplicates (at least in theory :) – Max Rydahl Andersen Dec 14 '14 at 12:04