Clone a drive from the commandline

I was reading release notes for a pre-release of an update to a popular operating system today when I noticed that it mentioned backing up your drive before installing it. The instructions were for using Apple Software Restore, which if you’re used to Unix abbreviations becomes asr. Thus the magic command is

sudo asr -source /Volumes/Source -target /Volumes/Backup

Where sudo executes the command with root privileges and Source and Backup are the names of your drives respectively (which reminds me, the Intel Xserve I’ve been playing with came to me with 3 drives called “Server HD”. Which meant they were actually called /Volumes/Server HD, /Volumes/Server HD 2 and /Volumes/Server HD 3, although they appeared in the Finder just as “Server HD”. I’m sure that’s a good way to break something subtly and nastily. What if the drives get mounted in the wrong order?). Note that Source can be the drive you’re currently booted off.

Although it did give me an error message about blessing the new drive, the cloned drive did boot as expected. Otherwise I’d probably resort to Superduper.

Leave a Reply

Your email address will not be published. Required fields are marked *