1. Computing & Technology

Discuss in my forum

Backup and Recovery How-To

By , About.com Guide


   Linux Complete Backup and Recovery HOWTO
   Prev        Next

2. Overview

The process shown below is not easy, and can be hazardous to your data. Practice it before you need it! Do as I did, and practice on a sacrificial computer !

The original target computer for this HOWTO was a Pentium computer. Originally, it had a Red Hat 7.1 Linux server or workstation installation on one IDE hard drive. Since then, I have used a number of computers, and they have been ugraded to Red Hat 8.0 and Fedora Cores 1, 3 and 4. . The target computer does not have vast amounts of data because the computer was set up as a "sacrificial" test bed. That is, I did not want to test this process with a production computer and production data. Also, I did a fresh installation before I started the testing so that I could always re-install if I needed to revert to a known configuration.


       NOTE
        

The sample commands will show, in most cases, what I had to type to recover the target system. You may have to use similar commands, but with different parameters. It is up to you to be sure you duplicate your setup, and not the test computer's setup.

The basic procedure is set out in W. Curtis Preston, Unix Backup & Recovery , O'Reilly & Associates, 1999, which I have favorably reviewed in Linux Journal . However, the book is a bit thin on specific, real-time questions. For example, exactly which files do you back up? What metadata should you preserve, and how? This document explores those questions.

Before beginning the process set forth in this HOWTO you will need to back up your system with a typical backup tool such as Amanda, BRU ™, tar, Arkeia ® or cpio. The question, then, is how to get from toasted hardware to the point where you can run the restoration tool that will restore your data.

Users of Red Hat Package Manager (RPM) based Linux distributions should also save RPM metadata as part of their normal backups. The following is in one of the scripts in this HOWTO:


   

bash# rpm -Va | sort +2 -t ' ' | uniq > /etc/rpmVa.txt

It provides a basis for comparison after a bare metal restoration.

To get to this point, must have:

  • Your hardware up and running again, with replacement components as needed. The BIOS should be correctly configured, including time and date, and hard drive parameters. At the moment, there is no provision for using a different hard drive.

  • A parallel port Iomega ® ZIP ® drive or equivalent. You will need at least 30 MB of space. A modern Linux installation with several kernels installed may run to over 100 MB.

  • Your backup media.

  • A minimal Linux system that will allow you to run the restoration software, which we will call the restoration Linux.

To get there, you need at least two stages of backup, and possibly three. Exactly what you back up and in which stage you back it up is determined by your restoration process. For example, if you are restoring a tape server, you may not need networking during the restoration process. So only back up networking in your regular backups.

You will restore in stages as well. In stage one, we build partitions, file systems, etc. and restore a minimum of files from the ZIP disk. The goal of stage one is to be able to boot to a running computer with a network connection, tape drives, restoration software, or whatever we need for stage two.

The second stage, if it is necessary, consists of restoring backup software and any relevant databases. For example, suppose you use Arkeia and you are building a bare metal recovery ZIP disk for your backup server. Arkeia keeps a huge database on the server's hard drives. You can recover the database from

* License

* Backup and Recovery How-To Index

©2012 About.com. All rights reserved.

A part of The New York Times Company.