Re: Disaster recovery, how to automate as far as possible? By: Chris Green to All on Mon Aug 02 2021 10:29 am
It depends on your need for availability. I suppose you don't want to do anything complex. I assume you are'nt using any CoW filesystem or snapshotting volume manager in your pi.
You cannot really take an SD card snapshop from a running system without risking bad problems. To the point problems are close to guaranteed, unless you use some snapshotting system.
I personally use a cronjob that turns off the services that may perform changes on the filesystems and them dump the filesystems sequentially over a network for my personal servers. The drawback is the services go down while you back them up. Thankfully my personal servers don't need 24/7 availability and the backup will be done and the services operational once again when needed. You can script a backup service that dumps the filesystems of the pi to an SD card over a network and then sets a bootloader for it, but sincerely I think it is more trouble than it is worth.