###########################################################################
#                                                                         #
# $Id: README,v 1.1 2002-12-16 09:31:54 billettd Exp $           #
#                                                                         #
# $Source: /usr/local/src/repos/www/htdocs/tools/drutils/README,v $         #
#                                                                         #
###########################################################################



                Disaster Recovery Utilities Version 0.2
                ---------------------------------------


Overview
--------

This package provides a simple set of disaster recovery utilities to
OpenBSD i386. The state of a running system can be saved and 
restored automatically (mostly hands off), including fdisk, disklabel,
installboot and data recovery operations.

There is no compilation required, the scripts are perl and shell and boot
floppy images (modified OpenBSD install media) are supplied.

The system draws inspiration from the HP-UX Ignite system which can
create golden images as well as produce a bootable recovery tape. This 
system uses a boot floppy instead of a bootable tape to start the 
process of rebuilding the machine and does not include any of the bells
and whistles found in HP-UX Ignite such as auditing changed files or 
the ability to re-partition or modify the target install disk. This 
system is limited to saving all filesystems listed in /etc/fstab to 
tape without being able to exclude parts of the file system hierarchy.

The crux of the system is a perl script that saves fdisk and disklabel
information and generates a series of rebuild scripts. These scripts and
the disk configuration files are saved to tape using tar and then the
filesystems listed in /etc/fstab are dumped to tape.

With the disaster recovery tape and the boot floppy, you now have the
ability to reproduce the system in the same state as when the tape was
created. To recover from a trashed system disk, insert the boot floppy 
and tape and reboot. Choose the recover option, specify the tape device 
and the system is rebuilt automatically.


Warning
-------

This software is intended for servers - not for multiboot systems.
It makes no provision for backing up or recovering non-OpenBSD data on 
the hard disk.


File List
---------

mkdrtape               The main perl script that creates DR tapes
floppyB29.fs           Boot floppy image (modified install floppy)
floppyB29-ser_cons.fs  Boot floppy image that uses a serial console
Makefile               Make file used to install software
mtree.conf             Used by installation process in creating OpenBSD
                       package
README                 This file
mkdrtape.8             Man page
mkdrtape.html          HTML version of man page
mkdrtape.txt           Text version of man page
drfloppy.diff          Diff from OpenBSD STABLE 19/12/2001 src tree for
                       creating modified boot floppy from source.
recover                Script on modified boot floppies that rebuilds the
                       system and recovers the data
pkg/*                  Used in creating OpenBSD package


Installation
------------

To install the disaster recovery utilities, uncompress/untar the 
distribution tarball, cd into newly created directory and run 
make install as the root user.

tar xzf drutils-0.1.tar.gz
cd drutils-0.1
make install

The install target creates a OpenBSD install package 
drutils-0.1.tar.gz in the packages sub-directory. This package 
is added to the system using pkg_add. The script to create the 
disaster recovery tape is installed into /usr/local/bin and the floppy
images are installed into /usr/local/libdata/drutils. The man page is 
installed into /usr/local/man/man8.

You can create the floppies by running make with the floppy or
floppy-serial targets. 

insert 1.44 MB floppy in floppy drive
make floppy

This simply runs:

dd if=floppy29.fs of=/dev/fd0c bs=32k


De-Installation
---------------

Since the script and floppy images are installed with pkg_add, you can
remove them with pkg_delete. The rebuild scripts and fdisk and disklabel
information created by mkdrtape are stored in /var/dr. This directory is
not removed by pkg_delete and can be safely removed if desired.

pkg_delete drutils-0.1


Operation
---------

See mkdrtape(8) for the main documentation. A brief summary is provided 
here.

After installing the package, run the mkdrtape utility. If your tape
drive is not /dev/nrst0, specify the tape drive using the -t option.

You will need to run this as root.

/usr/local/bin/mkdrtape

To recover the system, load the boot floppy and the disaster reecovery
tape and reboot the system.

Choose the recover option by typing r<ENTER>. Enter the tape device.
The default choice is /dev/rst0, you can simply hit <ENTER> if this is
where the tape is loaded or enter the tape device if it is loaded
elsewhere, e.g. /dev/nrst1<ENTER>. The disk is then partitioned using 
fdisk and disklabel. The boot block is installed using installboot 
and the data is recovered using restore.

