Hello all,
I’ve just migrated my personal on-prem hosting setup (files/postgres/xojo webapps) from Windows to headless Debian 12. I’d say it was neither easy-peasy, nor unreasonably traumatic. It was doable, I just wouldn’t want to have to repeat it any time soon.
Which brings us to the issue of complete system backup:
I’ve got a fairly simple setup:
- Debian 12.5 , no graphical environment
- Single 500GB SSD
- Single partition for the entire disk
- Not VM-based, OS runs on bare metal
How would you go about doing regular, scheduled backups of the whole thing?
And how would you restore it back to place?
I know there are about a million different ways to do that, I’d be interested in your experience and best practices.
I’m not using this for direct commercial purposes, other than personal convenience and marketing (like showcasing web apps), so losing it wouldn’t mean my demise, but I really, really, don’t want to go through installing and setting everything up again.
Thanks!
If you can stop the machine during backup, you can image it with clonezilla, then backup the “important” data that changes in a schedule with database dumps/rsyncs/etc.
https://clonezilla.org
So you have a disk image and some data to restore after restore the image if it crash, at times you image the disk again to refresh your backup image.
Other solution is relax and recover (a different approach, a bit more complicated make it work), but backups online
http://relax-and-recover.org
1 Like
Clonezilla is great if you can shut down the server and if you don’t need to restore individual files.
Take a look at Veeam – it can be scheduled for regular automatic backups, has a free license for a single machine, and can restore individual files or the entire machine. Make sure you have the Veeam recovery media handy in case you need to do a bare metal restore.
1 Like
I use DD to produce images. Images become stale very quickly though. Great for quarantining failing disks and short term duplication in the workshop. Not much good for restoring a server that has been operating for months or years.
The data centres servers I would need to restore in a hurry are virtualised and backed up with ActiveBackup on a Synology NAS.
Less critical boxes that I want to backup without shutting down I use a file level copy. Create a snapshot with lvm and rsync the snapshot excluding /boot /proc /sys /dev whatever fstab indicates is a tmpfs and any external mounts.
Which ever backup system you choose, monitor it and check you can actually produce a running system from it. I have lots of war stories about being called out to failed servers and having to resort to system rebuilds and forensic disk recoveries after discovering the backup was unusable.
1 Like
In the database world the mantra is: An untested backup is an invalid backup.
2 Likes