3

My desire is to have two identical Time Machine backups on two different locally attached drives. My first thought was a clone via Carbon Copy Cloner, but it won't do it, because Apple won't let third parties copy the filesystem that is being used for Time Machine backups (that's what the "error"-message says before I can even start the clone).

The reason why I need a command line approach is because I want to include the two backups in task-chain in Carbon Copy Cloner.

Everything I have been trying in that direction fails (no help found online so far), as Time Machine would always start backing up to the same drive over and over again. So what I can say so far: tmutil is not the way to go, no matter what options I choose. But maybe I missed something?

If I manually start the backup by clicking "backup now" in macOS (High Sierra 10.13.6 by the way), Time Machine will backup to drive 1 first, if I click it again (after backup has finished), backup to drive 2. By the way: same bevaviour if I set a schedule via Time Machine Editor.

So I am looking for a Terminal-way to imitate the macOS-approach to start the backup, as it seems this is the only way to make Time Machine use two different drives. tmutil only uses the last destination, again and again. Even if I setdestination to drive 2. But again: maybe I missed something.

  • 1
    Hello Kreiselblitz, welcome to Ask Different. Some information about your setup would be helpful, are both backup disks connected at the same time to your Mac? If they are not, you could simple add both disks to Time Machine and start a backup with tmutil. tmutil will pick then the available disk. Have you tried tmutil startbackup --destination <disk ID>? This would let you select the destination disk (to get the disk ID, run tmutil destinationinfo). – jaume Sep 1 '18 at 15:03
1

I don't think using terminal to configure Time Machine to back up to 2 different disks is necessary. If you have Time Machine setup currently to back up to one external disk, you can go back to the Time Machine preferences in System Preferences and select a different drive to back up to. After doing this you will be presented with the option of using both drives for Time Machine backups or change the existing drive. If you select the option of using two separate drives, the Time Machine backups will alternate destination drives for each backup. At least these are the options I am presented with, while using two separate 3 tb Time Capsules.

enter image description here

enter image description here

enter image description here

enter image description here

1

Thank you both for your effort and your help! I should have clarified my setup first, sorry for that! I already had both drives locally attached and selected as destinations in system preferences. I DO need the terminal command I have explained in my initial post: I want to run a short shell-script, which I can attach at the end of a finished Carbon Copy Cloner task. I have tried jaumes approach now and it worked: tmutil startbackup --destination <disk id 1> --block; tmutil startbackup --destination <disk id 2> --block. Why didn't I see --destination before?? I ran man tmutil a couple of times. Thank you!

Edit: someone else replied in the meantime: thank you! I will try the --rotate approach as well. But don't you use --block ? Otherwisee it just jumps to the next command and doesn't wait for the backup, or backupd, to actually finish. I thought that would lead to an error.

  • 1
    You're totally right - I block always, so I forgot to include that typing from my iPad : - ) – bmike Sep 1 '18 at 20:16
  • Alright, your way works fine too! :-) The thing is: I used --rotation in my previous "experiments" and it never worked. But who knows what I typed. – Kreiselblitz Sep 1 '18 at 20:21
  • 2
    Excellent - I’ve voted up your answer and question. Great work you can now vote up other people two after your first post here. Nice going - be sure to pay it forward. Especially wch1zpink - those screen shots and thinking take some time. :-) – bmike Sep 1 '18 at 20:41
  • Thanks for the votes, guys! Great forum, I should have come here years ago. Finally a forum where the first answer is not just "why do you want to do that?" – Kreiselblitz Sep 1 '18 at 21:12
1

I set up multiple destinations and just tell the system to rotate, it then chooses another drive if it’s mounted:

 tmutil startbackup --rotation --block

I often chain these so I get several connected drives both capturing a backup interval now(ish)

 tmutil startbackup --rotation --block; tmutil startbackup --rotation --block

I just use the GUI system preferences to add all my destinations and then I use terminal to mount and unmount the volumes that I want included/excluded from any potential rotation backup event (or normal time to backup event - which defaults to the rotation algorithm as well). I’ve just set the destinations and forgotten them basically.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .