0
I have a home file server in the following configuration:
- 4 HDDs of 2TB each
- 1 USB flash drive running the Debian OS of 8GB
I would like to make a full disk backup of the OS flash drive to another (non-identical) 8GB+ flash drive mounted in the OS. I'd like to do this without having to physically or manually access the server by just setting up a scheduled automated task to perform the backup.
What I've found while searching for a solution is that the main issue with this relates to not being able to prevent writes to the file system for the duration of the backup; which can then potentially corrupt the backup.
One possible solution would be to boot into single user mode and then use the dd
utility but I don't know how feasible that would be to wholly automate. My thought would be:
- Cron job initiates backup, starting by rebooting into single user (runlevel 1)
- Somehow get to a state to be able to mount the backup drive and run the dd command?
- Reboot back into the normal usage mode (runlevel 2 for my system)
Then if the system fails I'd like to just remove the failed drive, plug in the backup, and replace the backup with a fresh USB drive since the backup system will also have the backup script running on it.
Does this plan seem feasible or will it not work at all? Is there some other utility out there that can provide me with a similar solution?
I'd probably suggest making an initial image, then keeping the systems synced over rsync. Depending on your needs, rather than a full system image, you could probably 'just' backup a few key aspects of your system this is an approach that has served me well. In the past I'd have suggested remastersys, but the current state of it is a mess - current dev ragequit, and the active fork is fairly expensive, for an unknown project.
– Journeyman Geek – 2014-09-30T06:34:04.470This seems like a decent solution. I've used Clonezilla before for system images, but then you just get an image file that you can't mount and incrementally update; as far as I'm aware. Is Clonezilla (or some other tool) able to image a disk onto another disk in a usable state? – Alex – 2014-09-30T14:21:57.537