14
2
We use Apple's Time Machine to back up our Apple 10.5.8 workstations at the office.
If I want to restore a file, I need to open up the Time Machine GUI and browse files there. The GUI is ugly eye-candy and gets in my way.
Is there a way to browse the Time Machine archive using the Mac's command-line?
I'm used to Netapps and other storage appliances. I use backintime for my Ubuntu workstation. To restore a file with one of those systems, you can restore a file with a simple command like:
cp .snapshot/daily.0/filename.txt .
or
cp /backup/backintime/20100611-000002/backup/etc/shadow /etc/shadow
Is there an equivalent for Apple's Time Machine?
1An intermediate solution would be to use Finder to browse the Time Machine backups just like a regular folder. – fideli – 2010-06-14T22:23:11.287
@fideli : You said we can browse Time Machine in the finder. I didn't realize this was possible. It also turns out we can browse the Time Machine folder using the commandline! For example, I can a backup of
~/.vimrc
at/Volumes/TimeMachine/Backups.backupdb/$HOSTNAME/Latest/$USERNAME/Users/mydirectory/.vimrc
. – Stefan Lasiewski – 2010-06-14T22:48:20.850@fideli : I think you answered my question. Go ahead an put in your answer below, mention something about 'command-line' and collect your prize! – Stefan Lasiewski – 2010-06-14T22:48:57.760