Time Machine backup over VPN

Your first question is probably ‘Why would I want to do that?’ but if you’re a frequent traveller and depend on your MacBook heavily then chances are you’re not hitting up your TimeMachine duties as often as you should, especially if the target disk is on a NAS on your home network. Wouldn’t it be neat if you could run a full backup from your hotel room while you snooze?

To make this happen you’ll need a few things in place first:

  1. A machine to back up, ideally a MacBook Pro or Air
  2. Some form of TimeMachine compatible NAS device, either one of Apple’s proprietary units such as Time Capsule or an AirPort Extreme, or a third party unit like a Netgear or QNAP. My experience is with the latter, but others should work fine too
  3. Remote access to your own network. If you’re not lucky enough to have a fixed IP for your home router then you may be able to workaround this using DynDNS, but either way you’ll want to be able to set up a VPN connection rather than having your NAS box sit in the DMZ.
  4. An A record pointing to your NAS, so you can refer to it by name rather than IP address. This step is optional, but makes things easier later on if you decide to renumber your network – a stitch in time and all that.

If you’re still with me so far then you can probably see where this is going, and the rest is quite simple. Before you perform your first backup on the local network, mount the NAS share that TimeMachine will use via AFP in finder, then configure TimeMachine to use the mounted disk as it’s target. When the initial backup is done, unmount the drive, and try another backup. TimeMachine should find and mount the disk automatically.

Screenshot of OS-X Finder dialogue box

The same goes for backing up remotely, just connect your VPN and start TimeMachine. You shouldn’t need to mount the disk first, but if it claims that the drive can’t be found you might want to check that you can mount other NAS shares. Occasionally I find myself in a situation where my local network (hotel, Starbucks etc) has the same IP numbering as my home network, and since my default gateway doesn’t know to route NAS traffic through the VPN I’m left high and dry. It’s on the list …