I'm trying to implement the easy to maintain backup solution for our local linux server. The goal is to be able to restore the whole system from image file.
What I am thinking of is just to issue following script with cron
FILENAME=`date +%F`.bak
dd if=/dev/sda | bzip > /media/remote_backups/$FILENAME
The problem is that this script should be run in special environment - when only basic services work and no filesystems are mounted.
So, the question is: Is it possible to reboot the server by cron, for example, weekly, and then not boot normal mode, but some kind of "special" mode, when nothing loads, except:
- mount remote partition for backups at /media/remote_backups/
- execute dd as previously described