geerlingguy / arm-nas

Arm NAS configuration with ZFS.
GNU General Public License v3.0
123 stars 6 forks source link

Use Pi 5's RTC for scheduled wakeups for backups #13

Open geerlingguy opened 6 months ago

geerlingguy commented 6 months ago

Right now I have syncoid scheduled on cron to run nightly at 0713 UTC.

The Pi consumes around 8.5W of power continuously, or about 0.204 kWh of power per day. At my St. Louis area power rate, that equates to $0.03/day ($0.13/kWh summer rate), or $9.69/year.

If I set the backup—which normally takes < 10 minutes—on a timer, where I would:

  1. Boot
  2. Run the scheduled backup
  3. Set the next wakeup timer
  4. Shut down (using the low power state)

Then it would likely go down to < 0.003W, or approximately $0.00/year.

Assuming I run this NAS for the next 5 years, that's a savings of almost $50, which would pay for the Pi 5 RTC battery I would need to buy. (We're ignoring the labor that goes into enabling this feature...).

Some things I'd have to deal with:

Having the Pi shut down most of the time and not remotely bootable would have an added security benefit of being 'semi-offline', fulfilling an 'offline' backup for a 3-2-1 backup plan (though not replacing the need for a full offline backup that's separate...).

See also: Raspberry Pi 5 RTC - Auto wake up and shutdown

gdmn commented 6 months ago

You don't need a battery if the use case is just to keep Raspberry powered down for 23 hours: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#real-time-clock-rtc