Creating and using emergency recovery media

Creating and using emergency recovery media

Emergency recovery media (diskettes and tapes) enable you to recover your system if your hard disk experiences an unrecoverable error. You should create emergency recovery media immediately after you install your system, and again each time you add or change system hardware and software.

The following topics describe:

Keys to recovering your system

To ensure that you always have a set of emergency recovery media and data backups, we strongly recommend that you:

The emergency recovery diskettes contain a small, bootable version of UnixWare 7 from which you can boot your system.

The emergency recovery tapes contain an image of critical UnixWare 7 filesystems. If you have the UnixWare 7 NetWare Services product installed and configured, the tapes also contain an image of the NetWare Directory Services (NDS) master partitions and NetWare SYS: volume defined on your system.

By first booting your system with the emergency diskettes and then restoring it from the emergency tapes, you restore all the system software, filesystems, and NDS partitions that existed when you created the diskettes and tapes.


NOTE: If your system does not have a tape drive, you should still create emergency recovery disks and then back up the entire system onto other media or across the network by using SCO ARCserve®/Open from Cheyenne® or the cpio command.

See SCO ARCserve/Open from Cheyenne and the cpio(1) manual page for more information.


Performing regular system backups ensures that data added to your system after the creation of the emergency recovery media can also be restored. Data created after the most recent backup may be lost if your hard disk fails.

The system owner can back up the entire system on a regular basis. Individual users without owner privileges can perform backups of their own directories.

To ensure that you back up not only data but also any extended file attributes (such as privileges, ACLs, and NetWare file attributes), use SCO ARCserve/Open from Cheyenne or cpio(1).

See SCO ARCserve/Open from Cheyenne and the cpio(1) manual page for more information.

Creating emergency recovery diskettes

To create emergency recovery disks:

  1. Use the format(1M) command to create two formatted diskettes. For example, this command creates a formatted, 1.44MB diskette in the primary diskette drive:

    format -v /dev/rdsk/f03ht


  2. Label the diskettes with the name of the system, date created, and their name and number. For example:
     
       mymachine		mymachine 
       30 January 1998		30 January 1998 
       Emergency Recovery	Emergency Recovery 
       Diskette 1 		Diskette 2 
    


    NOTE: Emergency recovery disks are customized for a particular system and only work on that system.

  3. Log in to the system console as root. To switch from the graphical environment, press <Ctrl><Alt><F1>.

  4. Make sure there are no active users on the system. Enter:

    who

  5. If root is the only user logged in, bring the system to single-user mode with this command:

    shutdown -y -g0 -i1

    If other users are listed, bring the system to single-user mode with this command:

    shutdown -y -g300 -i1

    The -g300 flag in this command allows users 5 minutes (300 seconds) to close their files and log out. A broadcast message from root provides warnings that the system is coming down.

  6. After the system enters single-user mode, determine in which filesystem you will create the recovery media. The filesystem must contain at least 30MB of free space.

    To determine which filesystems have enough space, enter:

    /sbin/dfspace

    For example, you might see:

     
       /        : Disk space:  195.10 MB of  429.00 MB available (45.48%) 
       /stand   : Disk space:    5.82 MB of    9.99 MB available (58.28%) 
       /home    : Disk space:  238.86 MB of  479.00 MB available (49.87%) 
       /tmp     : Disk space:    7.98 MB of    8.00 MB available (99.85%) 
       /var/tmp : Disk space:    9.99 MB of    8.99 MB available (90.00%) 
    
    In this example, only the root (/) and /home filesystems have enough space to be used for creating the emergency recovery media.

  7. Enter:

    /sbin/emergency_disk -d pathname diskette

    pathname is the filesystem you selected. diskette is the diskette drive where you will insert the diskette (either diskette1 or diskette2).

    The following example creates an emergency recovery diskette on the first diskette drive, using the /home filesystem as its working directory:

    /sbin/emergency_disk -d /home diskette1

  8. When prompted, insert the first formatted disk into the appropriate diskette drive.

    Creating each emergency recovery disk takes about fifteen minutes.

  9. When prompted, remove the first diskette, insert the second diskette and press <Enter>.

  10. When prompted, remove the diskette from the diskette drive.

    Store the emergency recovery disks in a secure location.

After you create the emergency recovery diskettes, do one of the following:

Creating emergency recovery tapes

Emergency recovery tapes allow you to restore your system and its data to the configuration stored on the media.


NOTE: If you have installed the NetWare Services package, you may need to run the Directory Services Install utility before beginning this procedure.

If you are creating emergency recovery media immediately after installing your system, you do not need to run this utility. If, however, you add NDS partitions and NetWare volumes after installation, you must run Directory Services Install so that these partitions and data can be backed up.

For more information, see ``Installing NetWare Directory Services'' in SCOhelp.


To create emergency recovery tapes:

  1. Locate and label tapes for this procedure. Include the system name, date the tapes were created, and sequence number.

    The number of tapes needed varies according to the size and configuration of your system.

  2. Log in to the system console as root. To switch from the graphical environment, press <Ctrl><Alt><F1>.

  3. If the system is already in single-user mode, skip to step 5. Otherwise, make sure there are no active users on the system. Enter:

    who

  4. If root is the only user logged in, bring the system to single-user mode with this command:

    shutdown -y -g0 -i1

    If other users are listed, bring the system to single-user mode with this command:

    shutdown -y -g300 -i1

    The -g300 flag in this command allows users 5 minutes (300 seconds) to close their files and log out. A broadcast message from root provides warnings that the system is coming down.

  5. At the single-user prompt (#), insert the first emergency recovery tape into the appropriate cartridge tape drive.

  6. Create the emergency recovery tapes using either step a or step b.

    1. Use this step only if all the conditions below are true:

      • you have only one hard disk installed on your system

      • the tape drive you are using has the capacity to back up your entire hard disk on one tape

      • (if you have the UnixWare 7 NetWare Services product installed) the NetWare server on your system is the only server on the network

      Enter:

      /sbin/emergency_rec -e tape

      tape is the tape drive location of your inserted tape (ctape1 or ctape2). The -e option tells emergency_rec to back up the entire primary hard disk. Wait for this command to finish processing and then go to Step 7.

    2. Use this step for a multiple hard disk system or a single disk system that does not meet the conditions in Step 6a.

      Enter:

      /sbin/emergency_rec tape

      tape is the tape drive location of your inserted tape (ctape1 or ctape2).

      The emergency_rec command (without the -e option) backs up:

      • all UnixWare 7 partitions on your primary hard disk

      • the /home, /home2, /var, and /usr filesystems from the secondary hard disk, if they exist there

      • the SYS: volume of the NetWare Server, if NetWare Services is installed

      • any master NDS partitions defined on your system, if NetWare Directory Services is installed


        NOTE: The emergency_rec command does not back up any other UnixWare 7 filesystems on the secondary disk, nor any filesystem on additional hard disks, nor any additional NetWare server volumes defined on any disk.

        To back up these filesystems and volumes, see ``After creating emergency recovery tapes''.


        You are prompted to insert additional tapes as needed.

  7. Remove the last tape from the tape drive.

  8. Store the emergency recovery tapes with the emergency recovery floppy disks in a secure location.

Handling tape error messages

The following error messages may appear when you create emergency recovery tapes:

After creating emergency recovery tapes

After you create the emergency recovery tapes, either:

Recovering an unusable system

If your system will not boot, your system software is corrupted beyond repair, or your hard disk has been reformatted or replaced, you can use your emergency recovery media and incremental backups to restore your system.

Before attempting to restore the system, ensure that your motherboard, hard disks, memory, and peripherals are in good working order. Do so by running any hardware diagnostics included with your system by the manufacturer. While this recovery procedure restores all the system software, applications, and data on the recovery media to your hard disk, it does not ensure proper operation of the system hardware.

To recover the system:

  1. Place the first emergency recovery diskette in the primary (boot) diskette drive, and reboot your system.

  2. Correct the system damage or restore data from the emergency recovery tapes.

    The emergency recovery main menu provides options to:

  3. Use the up or down arrow keys or the <Tab> key to select the desired choice and then press <Enter>.

  4. Remove the emergency recovery disk. If you restored the system from the emergency recovery tapes, you can remove the last tape from the tape drive at this time.

  5. Press <Esc> to reboot your system.

    You may notice error messages similar to the following:

     
    UX: initprivs: WARNING: File ``file'' fails validation: entry ignored 
    UX: initprivs: WARNING: X entries ignored in ``/etc/security/tcb/privs'' 
    
    This is because the date stamp for the inode was changed during the restore process.

    You can fix these errors after your system boots into multi-user mode, by logging in as root and entering the following command:

    /etc/security/tools/setpriv -x

  6. If your system has the Netware Services (nws) package installed, you are prompted to re-insert the recovery tape after the system reboots, to complete the restoration of the NetWare file attributes.

  7. If you are running NetWare Directory Services on your system as part of the UnixWare 7 NetWare Services product, there are additional steps you need to follow to restore NDS if your system is part of a multiple-server NDS tree. These steps are necessary to avoid creating problems on the other servers on your network. For full information regarding restoring NDS for the UnixWare 7 NetWare Services product, see the Installation Handbook for that product.

  8. If you created any full or incremental backups of your system after creating the emergency recovery tapes, restore those backups using the restore method corresponding to the backup method you used to create them.

    For example, if you created backups using the cpio(1) command, use the same method to restore the archive.

    See SCO ARCserve/Open from Cheyenne and the cpio(1) manual page for more information.


© 1998 The Santa Cruz Operation, Inc. All rights reserved.