How To Perform a Bare-Metal Backup On Linux LVM 34
perlow writes "Using the free System Rescue CD you can perform bare-metal backups and restores of many types of computer systems. In this article, ZDNet columnist Jason Perlow explains the multi-step procedure in detail on an LVM-based system."
Another good disaster recovery solution (Score:3, Informative)
Re: (Score:3, Informative)
The objective of my procedure was to come up with a method that could back up ANY Linux distribution at a low level in a very standardized and platform independent way, without sacrificing storage or performance OR TOUCHING THE OS ON THE BOX IN ANY WAY. This works with any Linux system you boot the System Rescue CD on, it requires no package or so
Re: (Score:2)
I'll look into this and correct if necessary. It appears to be redundant because the config backup files contain the UUID.
Re: (Score:2)
I have found that Clonezilla is an excellent tool for creating recovery or deployment images however it is not really a true disaster recovery tool since you have to create an image by shutting dow
Sure - Don't. (Score:4, Interesting)
When I first discovered LVM (and it had already reached a quite mature V2 at that point), I thought it the greatest thing in volume management since the invention of the RAID.
I didn't half-ass it, I took my time to learn how it works, set up and broke a few, added a new PV and grew it to make sure it worked, backed some up, recovered from deliberately broken volumes (which works great - as long as you never try to bring the broken volume online by, say, rebooting), etc. Then I turned it on and loved it.
Then I received a hard lesson in what it means to say that JBOD has a failure rate multiplicatively proportional to that of each individual drive. And, surprise surprise, LVM amounts to nothing more than fancy OS-level JBOD, without even the performance boost of a proper RAID controller.
Thanks but no thanks. If I want to span a volume across multiple disks, I'll use RAID 5 or 6 from now on, ThankYouVeryMuch. I can only thank Zeus that I hadn't yet gotten around to cannibalizing my old file server when the LVM one day decided to eat itself (even if I could have salvaged something from the individual drives, I couldn't once it "fixed" its configuration to reflect the new PV set).
Re:Sure - Don't. (Score:4, Insightful)
And if you're not an Enterprise, this can be done on the "cheap" with RAID6 commodity boxes running as iSCSI targets.
If you're ever relying on a single device for ANYTHING you're doing it wrong. But LVM is perfectly safe if you do it in a responsible way. It just isn't necessarily super-cheap.
Re: (Score:3, Insightful)
I agree completely - And mostly meant that as my point (with an anecdote about myself as an otherwise-knowledgeable user making a really really stupid mistake).
LVM does work exactly as advertised - It just shouldn't have anywhere near the popularity it currently enjoys. For example, several Linux distros (Fedora comes to mind) set up an LVM by default. Ouch.
But ye
Re: (Score:2)
Re: (Score:3, Informative)
With traditional partitioning you have to slide the data along the drive (which requires you to take the system offline, is time consuming and will probablly screw things up big time if power fails while doing it).
With LVM, I can add unallocated space to any volume I like quickly and easilly. If the filesystem supports online resizing I can even do it without unmounting it.
I agree though that while LVM does have JBOD and striping
Re: (Score:3, Insightful)
LVM does work exactly as advertised - It just shouldn't have anywhere near the popularity it currently enjoys. For example, several Linux distros (Fedora comes to mind) set up an LVM by default. Ouch.
What the heck's wrong with that? I've been doing that manually on my cheap slackware systems for ages. I don't want hard partitions, and those who do are generally too young to remember the hell of C: D: E: F: G: H: drives in the old DOS days. Take a 250G drive, put a 5G / on it and LVM the rest for /usr
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
Your problem wasn't that you used LVM, your problem was that you made it into a JBOD. Some of us
Re: (Score:2)
Its not magic, you need RAID1 or RAID5 to get protection from drive failure, or good backups. LVM has some features that make this a good choice (eg snapshots) but it is not a RAID solution. Stick it on a redundant array and you'll be fine.
Re: (Score:2, Informative)
There are rarely free lunches when it comes to computer system configuration choices - and when there are free lunches, you can be sure that the hardware / software will be using that configuration by default.
The safest bet is this: If you aren't sure that you understand the trade-off you are making by using a tool like LVM, you should assume that it's going to come back and bite you in the ass. This isn't just true for software stuff either, hardware RAID 0 has basically the same reliability issues - but
Re: (Score:2)
If
Re: (Score:3, Interesting)
I didn't half-ass it, I took my time to learn how it works, [...]
Then I received a hard lesson in what it means to say that JBOD has a failure rate multiplicatively proportional to that of each individual drive. And, surprise surprise, LVM amounts to nothing more than fancy OS-level JBOD, without even the performance boost of a proper RAID controller.
These two statements are in conflict.
No! You have to use BOTH! (Score:3, Insightful)
LVM makes it easy to move space around on the disks, but it does NOTHING to prevent data loss from failed disks.
Put LVM on top of a RAID 1 or RAID 5 subsystem. Then you can add / replace disks and grow the volumes to use the new space.
Re: (Score:2)
Re: (Score:2)
LVM itself can also do simple mirroring (and striping) internally across multiple PVs, but this is used far less commonly than layering it over s/w, h/w, or remote RAID.
Re: (Score:2)
Re: (Score:2)
That's just dumb.
Re: (Score:2)
Hmm. (Score:4, Informative)
Systemimager (dead good, and also good to restoring an image to other machines too). Restores from a cd (or PXE) boot and pulls the necessary data from the server with minimal intervention.
Any virtualisation technology - depends on your definition of 'bare metal', but if you think of it as an easy-to-restore server, then I guess it counts.
r1soft's (paid-for) continuous backup solution. Not tried this, but many webhost type companies have said its the dogs danglies.
I prefer old school backup (Score:4, Interesting)
LVM and Raid can be a little complex if you boot off it so ill give some tips. A nice small boot like SLAX (may favorite) or Knoppix is needed to start any bare metal restore. Pick something that supports the hardware and had LVM and or Raid. Either make a custom disk to add your backup data to the volume or have a 2nd DVD drive. Boot and restore.
I make my backups via simple methods like rsync and tar. I use a few simple scrips to do it all. So simple that it is easy to restore by hand if need be. This makes the restore safer as it can be done a host of ways. Not to mention these unix tools are present in all distributions. Probably the biggest reason for the old school way is that on a bare metal restore often hardware may change. New drives etc, basically failure can be a reason to upgrade etc. Many utilities can choke on big hardware changes, new drive sizes and such.
I take detailed system information and note it in the backup as human notes. Then grab your raid & LVM configuration and write a quick script to rebuild these features via the command line. Basically just a list of the actions you take to make a file system and format them the desired files system types manually. These same scripts will also re-apply boot loader and such as well. If the volumes change after a failure I can just issue updated commands (or edit the script) and make a similar layout of the filesystem. Then just open the tar balls via script or by hand and populate the new filesystem with the files you archived. With a bit of practice all of this can be automated by scripts. But if you need to vary the procedure due to hardware changes or as a way to clone a system you can.
Re: (Score:2)
The RedHat shop way (Score:1)
As long as you keep a sane filesystem plan, the entire thing can be kept in an easy to follow procedure and fully scripted (except for the tape change on the amanda server).