Waking up System

Background

I need my NAS box to wake up regularly, so that it can initiate backups on its own. A quick searching suggested using rtcwake. Alas, a realm that I've never explored.

Yes, this is for pull-based backups, where the data is pulled from the main system by the NAS instead of pushing from the main to the NAS. I'll cover the details once I set up the backup process.

Procedure

Before start, make sure your hardware supports wake-up, and the BIOS is configured to allow setting wake-up from OS.

Using rtcwake is actually simple. Just designate either the amount of time to sleep, or the wall clock time to wake up.

rtcwake -s 30      # sleep 30sec
rtcwake -d 11:30   # wake up at today 11:30:00

rtcwake -s 30 -m mem   # suspend to memory

For the wall clock approach, make sure the system clock is properly set.

$ datetimectl | grep NTP
              NTP service: active                     

If NTP is not enabled:

sudo datetimectl set-ntp true