• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

backup methods

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
Curious what methods people are using for backup.

Currently I'm making rsync snapshots via bash script. Essentially the same thing rsnapshot does, but I wanted to explore doing it myself so I could better understand it.

That works great for file backup, but I was also wondering about how people are doing bare metal backups.

I was thinking of doing periodic dd backups of the system volumes as follows:
- dd mbr
- dd+gzip /boot
- dd+gzip LVM snapshots of volume groups

Certainly, I wouldn't use such a method on multi-terabyte volumes...much as I like waiting around 'til I'm old and grey for a backup to complete.

I'm guessing I can simply restore the snapshots by dd'ing back to /dev/system/<whatever>...not 100&#37; on that, but that's what VM testing is for. :)
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Don't do dd on anything mounted, the data you get may be stale because of updated pages in memory that haven't been flushed yet. You really should be able to just do a normal file backup and be fine. When you restore you'll just need a bootable disc or thumb drive to do the restore and reinstall GRUB and you should be fine.
 

Gooberlx2

Lifer
May 4, 2001
15,381
6
91
Don't do dd on anything mounted, the data you get may be stale because of updated pages in memory that haven't been flushed yet. You really should be able to just do a normal file backup and be fine. When you restore you'll just need a bootable disc or thumb drive to do the restore and reinstall GRUB and you should be fine.

Well, an LVM snapshot should be static so long as any changes don't exceed the --size parameter in lvcreate, otherwise it gets destroyed, IIRC. I think I can temporarily umount /boot without much issue. I dunno about the mbr.

Anyway, trying to restore the system state from LVM snapshot images on a wiped drive in a VM isn't going so well. :\
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Well, an LVM snapshot should be static so long as any changes don't exceed the --size parameter in lvcreate, otherwise it gets destroyed, IIRC. I think I can temporarily umount /boot without much issue. I dunno about the mbr.

Regardless, dd is a terribly ugly backup method.
 

MrColin

Platinum Member
May 21, 2003
2,403
3
81
I image my partitions with clonezilla. Works great, its a LAN or LiveCD bootable debian based OS. I also duplicate a lot of data across multiple computers with rsync in a bash script.
 

joetekubi

Member
Nov 6, 2009
176
0
71
I've used Clonezilla several times - I need to use it more often to backup my system partitions. I use an external USB drive and a "dar" script to backup my home partition and save it with the current date and time.
 

skyking

Lifer
Nov 21, 2001
22,777
5,939
146
I use dirvish on several production server pairs. It uses rsync via ssh to do the heavy lifting.
http://www.dirvish.org/

Pick your files, retention time, and go. Easily browse to individual lost(deleted) files without untarring a big glob of crap, moves only the changed files.
 

JD50

Lifer
Sep 4, 2005
11,918
2,883
136
I'm trying to get away from bare metal backups. Just back up your data and use kickstart and some scripts to rebuild your box if need be. Unless you have a really complex set up, you should just be able to back up user data and a few config files without too much effort.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm trying to get away from bare metal backups. Just back up your data and use kickstart and some scripts to rebuild your box if need be. Unless you have a really complex set up, you should just be able to back up user data and a few config files without too much effort.

Yea, but booting to a live cd or usb stick and restoring 1 or 2 tar balls is still going to be simpler and quicker.
 

JD50

Lifer
Sep 4, 2005
11,918
2,883
136
Yea, but booting to a live cd or usb stick and restoring 1 or 2 tar balls is still going to be simpler and quicker.

That depends. I can kickstart a basic server pretty quickly, probably wouldn't take much longer than booting up to a live cd and untaring an entire OS. There's also disk space, just backing up your data uses a lot less disk space than full bare metal backups. Your bare metal backup is also more hardware dependent.

IMO, if you're just talking about one or two boxes that you're backing up, then yea, it'd be quicker to go with your method. But if you're dealing with more than a few servers (IMO) you're better off coming up with a good kickstart build and just backing up your data separately. It makes provisioning more servers quicker, upgrading easier, takes less storage space, gives you a good template for your install, etc...

Using Red Hat Satellite Server or just cobbler is also great, btw.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
That depends. I can kickstart a basic server pretty quickly, probably wouldn't take much longer than booting up to a live cd and untaring an entire OS. There's also disk space, just backing up your data uses a lot less disk space than full bare metal backups. Your bare metal backup is also more hardware dependent.

Yea, disk space is the big draw back. But the backup shouldn't be very hardware dependent, most distros keep all of the storage modules in the initramfs image so it should detect whatever drives you have in there without any intervention.

IMO, if you're just talking about one or two boxes that you're backing up, then yea, it'd be quicker to go with your method. But if you're dealing with more than a few servers (IMO) you're better off coming up with a good kickstart build and just backing up your data separately. It makes provisioning more servers quicker, upgrading easier, takes less storage space, gives you a good template for your install, etc...

Using Red Hat Satellite Server or just cobbler is also great, btw.

Yea, probably. It also depends on the time you're given for planning all of that and the length of downtime tolerated and such.