|
Introduction and Prerequisites
Introduction
The make CD-ROM recovery (mkCDrec) tool was designed to recover from
CD-ROM a complete GNU/Linux system (Intel only) after a disaster
happened, such as a disk crash or system intrusion.
It is the purpose that you run the mkCDrec tool from time to time to
have an up-to-date snapshot of your system.
The tool was made to be as simple as possible, therefore, do not expect
a fantastic GUI of some kind. All it need is a console, and in case of
disaster you will be glad to see a console prompt !!!
Currently, mkCDrec can backup and restore ext2, ext3, msdos
, xfs, jfs, fat, vfat and ReiserFS
filesystems. Logical Volume Manager (LVM), hard- and software RAID
devices are also supported. Hardware RAID devices are supported too as
no special handling is required by mkCDrec. Although I do not advise to
reformat hardware RAID systems, e.g. Clariion, EMC, Hitachi, HP XP, HP
EVA, etc..., as the data protection is already in the storage box
anyway and it would take ages to complete.
Since mkCDrec v0.8.1 it is also possible to create a bootable tape, a
so called One-Button Disaster Recovery (OBDR) tape with OBDR compatible
hardware (see HP
documentation). Use the "make OBDR" command to create such an ODBR
tape, including your archives.
In which circumstances could this tool be useful?
- The main script start-restore.sh
lives in /etc/recovery and once booted from the mkCDrec CD-ROM this
script can do the following for you:
- after a disaster of some kind, e.g. disk crash, or
even after a successful system break-in, restore the complete system.
- the backups are off-line, t.i. on CD-ROM, or on an
off-line disk (preferably read-only mode), NFS mounted disk, or tape.
Therefore, those backups are protected for non-authorized users.
- to restore one disk (if there are more disks in
the
system available) from backup.
- restore backup of a disk onto a new (bigger) disk
in the system. The clone-dsk.sh script is capable to automatically
resize the partition layout.
- multiple copies can be made to increase reliability
of the backups.
- as a rescue tool, e.g. to do fsck of some kind or to
diagnose what's wrong with the system. See the mkCDrec Utilities to add
more tools to your rescue CD-ROM.
- "cloning" a
disk
to another disk even when the target disk is smaller in size than the
original disk, as long as there is room for the data. The clone-dsk.sh script will calculate the
partition
layout for you.
- multi-volume CD-ROMs so backups can be splitted up.
- "restore-fs.sh"
purpose is to restore a single filesystem of choice to a partition (has
to exist!), and the user can select the target file system type (to be
formatted). The command has no arguments.
- If your kernel permits set-up (or migrate) to LVM,
Software RAID, or another type of filesystem.
- Increase (or decrease) the partition size with the
help of mkCDrec Utilities.
- if you used this tool for something not in this
list,
please let me know.
Some words of wisedom:
- booting the CD-ROM image made by this tool give you
"root" privileges (no password asked [accept on tty5 ALT-5 t.i.])
on that system! Therefore, physical secure your servers, e.g. put them
in a locked computer room where only authorized users can access those
systems.
- this tool does not replace the process of making
back-ups. It only makes a snapshot of the time it was run, althought
not
bad to have ;-) Some have nothing or even less ;-/
- do not expect miracles from this tool either. It is
a
best effort tool, with other words, it can (maybe will) fail. Murphy is
always around. Not all possible cases are foreseen. On the other hand
if the "start-restore.sh" kicks you out, you still have the prompt and
you can correct the problem and try again. Not all tools give you a
second chance.
Note: if you correct some scripts in the /etc/recovery directory do not
forget to ftp them to another system before rebooting the recovered
system (otherwise, the improvements are lost and you cannot send them
to
us). - If all recovery attempts by start-restore.sh fail, you still
have enough information about the system in /etc/recovery
directory .
Design Goals
- a bootable El-Torito CD-ROM will contain the
"current" running GNU/Linux kernel and the most important executables.
In case one has a disaster the recovery environment resembles as close
as possible the current system containing all bits and pieces of that
system, including PCMCIA modules.
- works on any GNU/Linux Intel or AMD based PC (laptop, workstation
or
server), PCMCIA support is included. Most other distribution do not
give you the choice...
- the CD-ROM can be used as a rescue
CD , for disaster recovery if the
user whishes, or to clone a disk to
another
system.
- unattended backups and CD creation with cron are
possible (see 'make help'), and check also the contributions directory
- restoring a single file system to another disk and
use another file system type (with the restore-fs.sh script).
- a complete disaster recovery set on one (or more)
CD-ROM(s) especially for critical systems such as firewalls. If a
disaster happens (e.g. a disk crash) one should be able to restore,
from a bootable GNU/Linux CD-ROM, the complete system back. The
limitation however is the physical storage size of a CD-R (approx. 650
MB), but with multi-volume CD sets that is no real issue anymore.
- allow to store the backups across networks with the
aid of NFS or CIFS.
- allow to store the backups on other (external)
media,
such as (remote) tape, ZIP drives, etc.
- allow to boot from a floppy instead of CD-ROM, in
case the PC's BIOS cannot handle bootable El Torito CD-ROMs.
- modular design for adding new modules (see the
modules/ directory for examples).
- keep the procedure as simple as possible for
creating
the CD-ROM and backups - a simple "make" command does everything. There
is only one config file (Config.sh ) to
change
the make behaviour.
- the recovery procedure must be started manual and is
fully automatic after positive acknowledgements from the user, or it
can
be done step-by-step (manual). A clone-dsk.sh script is provided to
make disk cloning easier.
Prerequisites
- Have a (SCSI or IDE) CD-ROM in your system to boot
from. If not, have a look at rescue floppy distributions via
sourceforge.net or freshmeat.net
- To help you there is test module to check some
prerequisites for you:
If you see something like the following than all is well:
- Download (if not yet done so) a recent GNU/Linux
kernel (preferably 2.2.*, 2.4.* or 2.6.*) from http://www.kernel.org/pub/
or any mirror site. GNU/Linux kernels version 2.4.x or 2.6.x tend to be
bigger in size than 2.2.x kernels. This could lead to a boot floppy
image of 2.88 Mb instead of 1.44 Mb, which is fine for El Torito
CD-ROM, but which could lead not being able to create a physical boot
floppy of 1.44 Mb (if desired).
Forget the creation of physical floppies for kernels of version 2.6.x.
Install the mkCDrec Utilities to avoid
problems in the future as
mkCDrec will use isolinux to boot from CD-ROM instead of syslinux.
- Check current kernel if the following items were
compiled into the kernel. Check file /usr/src/linux/.config
:
- CONFIG_BLK_DEV_IDECD=y (or m)
- CONFIG_BLK_DEV_LOOP=y (or m)
- CONFIG_ISO9660_FS=y (or m)
- CONFIG_JOLIET=y
- CONFIG_BLK_DEV_RAM=y
- CONFIG_BLK_DEV_RAM_SIZE=4096 (or 8192)
- CONFIG_BLK_DEV_INITRD=y
- CONFIG_MSDOS_FS=y (or m)
Unfortunately, if one of the above are not set it is necessary to
recompile your kernel. - If you have a SCSI CD-ROM check also the
following items in /usr/src/linux/.config:
- CONFIG_SCSI=y (or m)
- CONFIG_BLK_DEV_SR=y (or m)
- Check your PC's BIOS (during boot-up press F1, F2 or
DEL key). The SETUP menu of the BIOS will show what is possible (after
a
little searching ;-)
Check if the CD-ROM is in the boot device list (hard disk and floppy
are always there). If CD-ROM is in the list then you have to move it up
as first or second entry (before the hard disk). Otherwise, do
not worry, we can make a boot floppy too ;-) - Check if you have
the
'mkisofs' command on your system. If yes, check the version as
following:
# mkisofs
--version
mkisofs 1.14
(i686-pc-linux-gnu) |
Version 1.14 or higher is preferred. Please check on
your distribution CD-ROMs first, or via rpmfind.net.
Anyway, you can download the sources from
ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/mkisofs/
- Check if the 'mtools' are on your system, and if so
which version:
# mformat -V
Mformat version 3.9.7, dated
1 jun 2000
configured with the following
options: enable-xdf disable-vold disable-new-vold disable-debug
enable-raw-term |
As shown version 3.9.7 or higher is preferred as it has to be able to
create 2.88 Mb boot floppy images if needed (download from http://mtools.linux.lu/ or from
your
distribution).
- Have access to CD- or DVD-writer to burn the built
ISO filesystem onto a blank CD-R(W) or DVD±R(W).
- Check if you have the which command on your
GNU/Linux distribution as "make test" depends on it.
# whereis which
which: /usr/bin/which /usr/share/man/man1/which.1.gz
|
- And last, but not least. You have to be able to
become "root". That is uid=0
(verify with 'id' command).
$Id: introduction.html,v 1.6 2001/10/14
14:56:57 gdha Exp $
|
|