Automate Time Machine backup to an external drive?

Continuing the discussion from How to eject device:

Interesting. I wonder if it's possible to:

  1. Mount an external Time Machine drive
  2. Wait for it to finish mounting
  3. Run a Time Machine backup
  4. Unmount the drive when the backup is done

Any ideas?

Mounting the disk is easy enough, waiting for it to mount is a Pause Until Mounted Volume condition. Running Time Machine is easy enough via the time machine utility command (tmutil?). Detecting when Time Machine is finished, that I don’t know. And then unmounting it is easy enough again.

1 Like

I would think that there is a process running when TM is doing the backup. If so, you should be able to detect this using AppleScript/JXA System Events.

Thanks. The more I think about it, the less I think I want to do it anyway.

But I’ll think some more. :slight_smile:

I know that my Time Machine backups are small on my machine, so the timing mechanisms I've built in to this macro are relatively short. Obviously, adjusting them for different circumstances would be easy.

1 Like