A backup only helps if it actually runs. If your Mac sleeps all night, an overnight backup never happens - or it starts and gets cut off when the Mac dozes off mid-copy. Here’s a reliable pattern: wake the Mac on a schedule, keep it awake long enough to finish, then let it sleep.
The three pieces
- Wake it at a fixed time with
pmset. - Keep it awake while the backup runs, so idle sleep can’t interrupt.
- Let it sleep again when the backup is done.
Most guides only cover step 1 - which is why people wake their Mac at 2am only to have it sleep again before the backup finishes.
Step 1: schedule the wake
Wake (or power on) every night at 2am:
sudo pmset repeat wakeorpoweron MTWRFSU 02:00:00
Check it landed:
pmset -g sched
A scheduled wake turns the system on with the screen still off and locked - which is exactly what you want for an unattended backup. (See the full sleep/wake scheduling guide for the day letters and one-off events.)
Waking from sleep vs powering on from off: waking from sleep is the reliable choice for automation. Powering on from a full shutdown needs the Mac on power, and on a FileVault Mac it stops at the login screen before your backup can run. Leave the Mac asleep, not shut down.
Step 2: keep it awake until the backup finishes
This is the step everyone misses. A scheduled wake gets you awake at 2am, but macOS can idle-sleep again within minutes - and backups spend a lot of time waiting on disk and network, which looks “idle” to the system. Two ways to hold it:
Wrap a backup script with caffeinate so the Mac stays awake for exactly as long as the job runs:
caffeinate -i /path/to/backup.sh
Or let AwakeMate watch the backup app/process - add your backup tool (or the process your script runs) to its watched list, and it holds the Mac awake only while the backup is actually working, then releases. That also covers Time Machine and GUI backup apps that have no command to wrap. See AwakeMate for downloads & backups.
If you rely on Time Machine’s own hourly schedule or Power Nap instead of a script, enable Power Nap so macOS runs Time Machine during sleep on power:
sudo pmset -c powernap 1
That’s lighter than a full scheduled wake, but it only covers Apple’s own tasks (Time Machine, iCloud) - not your own scripts.
Step 3: let it sleep afterwards
If you wrapped the job with caffeinate or used AwakeMate, the Mac simply returns to normal idle sleep once the backup finishes - nothing to undo. If you’d rather force a hard bedtime, add a scheduled sleep as well:
sudo pmset repeat wakeorpoweron MTWRFSU 02:00:00 sleep MTWRFSU 04:00:00
Just make sure the window is long enough for the backup to complete, or a large run could be cut off at 4am.
A complete recipe
# Wake every night at 2am
sudo pmset repeat wakeorpoweron MTWRFSU 02:00:00
# In your backup script (or a launchd job that runs at ~2:05am):
caffeinate -i /path/to/backup.sh
Wake on time, stay awake only as long as the copy needs, sleep when it’s done. If you’d rather not manage scripts and caffeinate, let AwakeMate handle the “stay awake until it’s finished” half - it’s the piece a bare schedule can’t do.
To undo the schedule later: sudo pmset repeat cancel. And if your Mac is waking when it shouldn’t, see why won’t my Mac stay asleep.