Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know of a command line method to select the active Time Machine disk? I would like to alternate between two backup disks for redundancy. I would like this to be automated, presumably via cron, perhaps launchd.

There is an AppleScript method to swap disks, but I am doing remote system administration and cannot rely on GUI scripting. I would presume there is sufficient control of Time Machine using the defaults command, but am not sure how to achieve this yet.

share|improve this question
Update: Here is a solution for this on 10.7 Lion: – user588 Sep 13 '11 at 14:43
up vote 2 down vote accepted

Note: The restore component of backing up like this has not yet been tested.

Get the ID of the attached drive

defaults read /Library/Preferences/ BackupAlias                       

Eject, plug in 2nd drive, make it the Time Machine drive with the GUI, repeat.

Write (rather than read) the ID:

defaults write /Library/Preferences/ BackupAlias '<00000000 014e0002 ....>'                                                   

source & thanks to Christian Stocker. Key comments from that post:

  1. "WARNING: The defaults command will be changed in an upcoming major release to only operate on preferences domains. General plist manipulation utilities will be folded into a different command-line program."

  2. Also the property DestinationVolumeUUID should be set.

share|improve this answer
This is easier to do on 10.7 Lion: – user588 Sep 13 '11 at 14:44

If your need is to have redundancy on Time Machine backups, an alternative is to maintain a clone of your Time Machine Volume. I use SuperDuper! for that purpose.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.