DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

emergency_rec(ADM)


emergency_rec -- create emergency recovery tape(s)

Synopsis

emergency_rec ctape1|ctape2

emergency_rec -d [-b bsize] ctape1|ctape2

emergency_rec -e [-b bsize] ctape1|ctape2 [tapesize]

Description

The emergency_rec command creates emergency recovery tape(s) from the primary and secondary (if it exists) hard disk drives on the system.

From the primary disk, the following are copied to the tape:

If there is a secondary disk drive, the /home, /home2, /usr, and /var file systems (if they exist on the disk) are copied to tape.

When used without any options (first Synopsis), emergency_rec will use the block size specified in /usr/lib/drf/tapeconfig (see below). It will use cpio(C) to copy the filesystems and dd(C) to copy the System partition. If multiple tapes are required, it will prompt the user to insert new tape.

When used with the -d option (second Synopsis), it will use dd(C) to copy everything. It will expect the tape to be big enough and will not prompt for additional tapes. A block size of 60k is used unless block size is explicitly specified with the -b option.

When used with the -e option (third Synopsis), emergency_rec will backup the entire primary disk. If a block size is not specified with -b, it will use the block size specified in /usr/lib/drf/tapeconfig (see below). If tapesize is not specified, it will assume that the tape is large enough for backing up the entire primary disk. If tapesize is specified, it should be a multiple of the block size; if it is not, it is silently rounded off. When tapesize is specified, the user is prompted for an additional tape when the current one is full.

emergency_rec must be executed in single user mode; see shutdown(ADM).

To restore systems backed up with emergency_rec, boot the system using the diskettes created by the emergency_disk(ADM) command.

emergency_rec is designed to back up the system in case an emergency occurs (your hard disk is damaged and must be restored to an earlier state). In such circumstances, it is quicker and easier to restore your system with the emergency recovery diskettes and emergency recovery tape(s) instead of installing your system again.

emergency_rec backs up all files on each filesystem saved. Typically, emergency_rec is run once after all the system software is installed (if you later install additional system software, run emergency_rec again); Once you create the emergency recovery media, use regular commands or third-party applications to backup and restore user and application data.

Specifying the block size

Some transfer block sizes can cause restore failures with dd(C) on some filesystems. To prevent this, specify the block size of the data transfer using the -b flag. See below. [Note that for compatibility, deprecated options -s and -o are also honored. The -s and -o options are similar to -d, except that block sizes of 512 bytes and 32k bytes are used with them, respectively.

emergency_rec queries the /usr/lib/drf/tapeconfig file for the physical block size to use for a specific tape device. If no entry is found, it uses the default ``safe mode'' of 512 bytes. Physical block sizes will vary, depending on the tape drive/HBA combination used. You should consult your tape drive manufacturer to find the maximum block size allowed.

Please note that both the emergency_disk(ADM) floppies and the emergency_rec tapes will need to be recreated following a change to this file.

Note also that you must ensure that the same block size is used when restoring a filesystem.

The format of the tapeconfig file is:

   tapedevice1	blocksize1
   tapedevice2	blocksize2
   .
   .
   .
The tape device field is the logical device name. This must be resolvable into an actual device. See the alias attribute on putdev(ADM). The blocksize field is the block size in bytes.

Options


-b bsize
Specifies the block size to use, where bsize is the number of bytes. The suffixes k, M, and G can be used for kilobytes, megabytes, and gigabytes (respectively).

-d
This specifies that dd uses a block size of 64KB for all filesystems.

-e
Back up the entire primary hard disk including any non-UNIX partitions. The secondary disk is not backed up at all. The optional tapesize argument allows you to split the disk image across multiple tapes if the tape's capacity is smaller than the disk size.

-o
This specifies that dd uses a block size of 1024 bytes for /stand, and 32KB for everything else. Use -b instead to specify block sizes.

-s
This specifies that dd uses a block size of 512 bytes for writing and restoring all filesystems. Use -b instead to specify block sizes.
If no flags are specified, the backup mechanism uses cpio(C) instead of dd(C).

Parameters


tapesize
specified either as a number of 512 byte blocks or as a number with a suffix of k, M or G to indicate kilobytes, megabytes or gigabytes.

If tapesize is not specified, the tape must be large enough to back up your primary hard disk. For example, you could use a 4GB DAT tape provided that your system's primary hard disk were no larger than this.

Exit codes

The emergency_rec command exits with one of the following values:

0
Success.

1
Failure. Unable to open tape drive or unable to write to tape drive.

Examples

To create an emergency recovery tape using tape drive 2, insert a tape into tape drive 2 and enter:

emergency_rec ctape2

Warnings

Attempting to use the emergency_rec command to copy the system from one machine to another is prohibited. The emergency recovery tape is customized for the hardware on which it is created and may have unpredictable ramifications if used on another machine.

References

emergency_disk(ADM)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005