2013 June

Apple Time Machine – get back in the Driver’s Seat!

Background

Maybe it is just me again overcomplicating things. Yet I recently noticed that when I went on my VPN, using my IPhone to connect to the Internet, and then OpenVPN, at some point, TimeMachine decided to run a backup. Not the best idea in the world even if you are not on a world-wide flat rate, as it will eat up all your internet bandwidth (and also your data plan and hence pocket money if you’re not on a flat rate.)

Unfortunately, TimeMachine, like so many other of Apple’s products, are created for people who Apple apparently considers too dumb to configure anything about – and hence there’s not so much you can configure using their visual tools. I was having one external (USB) disk as TimeMachine target, and one network attached storage (actually a larger server I’m hosting, exposed through netatalk / AFP).

Now TimeMachine having two targets will just cycle through them. If you happen to be on the go, and just “appear” to be home (using VPN), then, well, see above.

Fortunately I saw that Apple provides for a small command line utility, tmutil, which you can utilize to control TimeMachine better. Yet as I’m a strong believer in Wall’s three fundamental virtues of any great programmer, one of which is laziness, I’m definitely too lazy to remember command line options, type stuff by hand, etc. That’s why I utilized today’s lunch break to come up with a quickly hacked together small Perl script which wraps tmutil (i.e., you can use it as a proxy), which gets you back in the driver’s seat. The File is attached, here’s how it works.

Read more…

By mnott on 2013/06/03 | Code, Computer | 2 comments