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.

Things in my iMac are failing, most notably the hard drive. I can only reliably boot to the Recovery Partition. Booting to the regular system, either normally or in Safe Mode, does not work, and causes the machine to power off midway through boot.

This computer is most likely fubarred. Is it possible to initiate a backup through the Recovery console? I'd prefer to get a Time Machine update, but I'll take whatever backup I can get.

I am running the latest version of Lion (OS X 10.7).

share|improve this question

3 Answers 3

Unfortunately you cannot backup the Mac through the recovery partition. However starting the Mac in Target disk mode or booting the Mac from a bootable external drive may allow you to mount the iMac's drive and copy files from it.

share|improve this answer

The Recovery Partition includes Disk Utility, which you can use to clone your hard drive to a new drive. However it's worth noting that if your disk doesn't reliably boot, at least some of the files on it are corrupt (at best), or the mechanism is damaged, and you may be causing further damage by trying to do a heavy read operation.

share|improve this answer

You can clone the volume in Terminal with the rsync command (replacing "Macintosh HD" and "Backup" with the actual volume names):

dev=$(hdik -drivekey system-image=yes -nomount ram://1024)
newfs_hfs $dev
mount -t hfs -o union -o nobrowse $dev /private/tmp
/Volumes/"Macintosh HD"/usr/bin/rsync -axE /Volumes/"Macintosh HD"/ /Volumes/"Backup"

Note: it's very important that the source path ends in "/", and the destination path not end in "/".

Note: this could be optimized a bit by excluding irrelevant things like /private//var/vm, but since you'll be typing it by hand it probably best to keep it simple. Also, @CanuckSkier's warnings about corrupt files and disk damage apply here too.

EDIT: after testing, found that I need to create a ramdisk on /private/tmp so it can store its metadata files. I added steps to the procedure above.

EDIT: fixed typo

share|improve this answer

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.