Slashdot Log In
How To Perform a Bare-Metal Backup On Linux LVM
Posted by
timothy
on Wednesday May 07, @03:00PM
from the you-may-touch-only-the-heavy-atoms dept.
from the you-may-touch-only-the-heavy-atoms dept.
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."
Related Stories
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.

Another good disaster recovery solution (Score:3, Informative)
Reply to This
Re: (Score:3, Informative)
The objective of my procedure was to come up with a method that could back up ANY Linux distr
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)
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).
Reply to This
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.
Reply to This
Parent
Re: (Score:3, Insightful)
I agree completely - And mostly meant that as my point (with an anecdote about myself as an otherwise-knowledgeable
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
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 t
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Its not magic, you
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 tha
Re: (Score:2)
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 not
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 ne
Re: (Score:2)
Re: (Score:2)
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.
Reply to This
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.
Reply to This
Re: (Score:2)