Mac – Time Machine backup to remote disk at night

airportbackuptime-machine

I would like to set up energy saving schedule such that my computer is woken up at 2:58 AM.

At 3 AM, stuff that is really, really important to me is backed up to Amazon Glacier.
I'd also like to perform a Time Machine backup at that time to my Airport Extreme that has an HDD attached to it. [I know that Apple does not recommend using an Airport Extreme for that, but it works.]
Problem is that I'm only connected wirelessly, and sometimes there seems to be trouble mounting the backup drive.

I disabled hourly backups, because
a) I don't need them
b) it disturbs me

No backup is not an option either, so I'd love to go for the nightly way.

What I know:
– how to wake up my Mac at a specific time of day
– how to get time machine to only perform backups at a scheduled time
– how to use Airport Extreme as my backup device

What I do not know:
– how would I make my Mac connect to wifi at login screen, so it can connect to the AE
– how, without being logged in, get the Mac to actually mount the backup drive before login

Right now my setup should work (I will see for sure tonight) for when my Mac is sleeping, and my user is logged in. Mac will wake up at 2:58 AM. Will mount_afp the AE drive at 2:59 AM, will start Amazon backups, and start Time Machine backups at 3:00.

Best Answer

To schedule your Mac to boot or wake up at a particular time every day, you can use the Terminal command pmset. In your case, the appropriate pmset command would be:

pmset repeat wakeorpoweron MTWRFSU 02:58:00

To schedule Time Machine backups on crucial servers after hours, I've relied on TimeMachineEditor. With this app, you can set backups in a very granular fashion.