Back to article
Point-and-Click Linux LVM Filesystem Workstation Backup, Part 1
Taking Advantage of LVM
May 24, 2007
How would you like an easy way to set up a point-and-click Linux image backup that always makes perfect copies if the physical system is OK? That will point and click to a mirror drive or a multiple DVD backup set as you wish?
LVM (Logical Volume Manager) is now the default filesystem for Fedora Core, RHEL, and distros derived from them. This makes it common enough that you�re likely to run into it, so the default backup setup here will tell you how to set up an LVM backup.
The reader using other Linux filesystems should be able to use the following by ignoring everything that's LVM-specific--such as the "Dealing with LVM UUID" and the sections commented in the scripts.
Here you'll find simple techniques that will not only work, they will enable you to easily create a simple GUI-driven backup for users. With appropriate modifications, this should even work not only for other Linux distributions, for ext3 filesystems, and perhaps even for Windows.
The advantage of setting up backup via LiveCD for non-LVM systems is that if you try to back up a live filesystem, if any files change during the course of the backup, your backup is going to be corrupt, assuming that it even completes. When I tested the old dar backup setup, the dar archiving utility never got past the second DVD of a set of 10 when run from a live filesystem. I think current distribution versions have more background processes than they did a couple of years ago (see Figure 1).
The first thing you'll need is a copy of the Knoppix LiveCD. Get it here. This article is based on v5.0.1, but any recent version should work.
Don't burn it yet.
If you want to back up to a drive mirror, you'll need a second HD, preferably a model identical to the main HD, and you need a mobile rack so once the backup is done, you can unplug the drive and remove it from the system. If the hard drive and other parts get fried, with a mobile rack, you can simply get another motherboard and PSU, change the volume ID to the original (see below), and boot to your normal working environment. The alternative is to watch your main and backup drives go up in smoke at the same time (which is why I use a mobile rack instead of RAID).
Mobile Rack: The SanMax PMD-96I Black Mobile Rack has served me well for the last 18 months. It's inexpensive ($16.49 at Newegg) and I see no reason not to recommend it. Buy it or something better (which will probably be considerably more expensive), plug your HD into the tray connectors, put the mobile rack in a drive bay, plug it in. While you're inside the box, if you don't have round, shielded drive cables, get some. They're more fun than inexplicable backup errors due to signal leakage between conductors. There are plenty of SATA mobile racks available, but I haven't upgraded to SATA yet and can't recommend any yet.
If you want to back up full images to DVD archival media, you need a DVD burner. A full Linux installation and data won't fit into a single CD anymore.
If you want to back up to tape, there are many articles and forum postings all over the Net on how, I stopped using tape years ago.
First go to the computer BIOS. In "Advanced Settings", set boot order:
Then turn "fast boot" off. If one is sitting at the computer waiting for it to boot, it's just as easy to hit the Esc key, and it's a lot easier to open a CD tray to put in a boot CD before the POST completes if it takes a minute for a computer to prepare for boot instead of less than a second if fast boot is on.
Note: to get to root in Knoppix, simply:
Knoppix doesn't demand a password to open root... type su as user and the prompt changes to # .