Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administrator's Guide: Routine Management Tasks: HP-UX 11i Version 3 > Chapter 3 Managing Systems

Restoring Your Data

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

HP-UX has a number of utilities for backup and recovery. This discussion focuses on the fbackup and frecover commands used by HP SMH. Refer to the HP-UX Reference for information on the other backup and restore utilities: cpio, dump, ftio, pax, restore, rrestore, tar, vxdump, and vxrestore.

The following topics are covered:

Determining What Data to Restore

There are two scenarios you will likely encounter for restoring files:

  1. You need to recover one or a few files, usually as a result of an accidental deletion or because the file has been overwritten.

  2. You need to recover all of your files. This is usually part of the system crash recovery process. If you have experienced a file system failure and you suspect that you have corrupt data, refer to System Recovery. If your root disk failed and all the data on the disk is lost, you need to re-install HP-UX; refer to the HP-UX installation guide for your version of HP-UX for details. After you have repaired the file system or replaced the hardware, you can restore your data from your most recent backups.

Ensure that your system can access the device from which you will restore the backup files. You might need to add a disk or tape drive to your system; refer to Configuring HP-UX for Peripherals for more information.

Before Restoring Your Data

Gather the following information and materials before you begin:

  • A list of files you need to restore

  • The media on which the data resides

  • The location on your system to restore the files (original location or relative to some other location)

  • The device file corresponding to the backup device used for restoring the files

Restoring Your Data Using HP SMH

You can use HP SMH or HP-UX commands to restore data. Generally, HP SMH is simpler than HP-UX commands. If your backup was created by the fbackup command (which HP SMH uses), you can use HP SMH or the frecover command to restore the files from your backup.

Restoring Your Data Using HP-UX Commands

The command restores backup files made using the fbackup utility. If your files were not created with fbackup, you will need to use another utility (see Choosing the Backup and Recovery Utility).

To restore files from backups using frecover:

  1. Ensure that you have superuser capabilities.

  2. Ensure that files you intend to restore are not being accessed. The frecover command will not restore files that are active (open) or locked.

  3. Verify that the backup device is properly connected.

  4. Verify that the device is turned on.

  5. Ensure that the device is loaded with the appropriate backup tape.

  6. Restore files using the frecover command.

The -r option to the frecover command is generally used for recovering all files from your backup; the -x option is used for restoring individual files to your system. For complete details, see frecover(1M).

Restoring Files that are NFS Mounted

When restoring files that are NFS mounted to your system, frecover can only restore those files having “other user” write permission. To ensure the correct permissions, log in as superuser on the NFS file server and use the /usr/sbin/share command to export the appropriate permissions. For more information, see share(1M) and NFS Administrator’s Guide.

Restoring Large Files

If you use fbackup to back up large files (> 2 GB), then those files can only be restored on a large file system. For instance, suppose that you back up a 64-bit file system containing large files; you cannot restore those files to a 32-bit file system that is not enabled for large files.

If a backup contains large files and an attempt is made to restore the files on a file system that does not support large files, the large files will be skipped.

Examples of Restoring Data

Here are some examples of restoring data:

  • To restore the files using frecover in the directory /home/deptA from a DDS format (DAT) tape:

    frecover -x -i /home/deptA

    If files are currently in a directory on the disk that is newer than the corresponding files on the tape, frecover will not overwrite the newer version on disk because the -o option is not specified.

  • To restore the files using frecover from all of the directories under /home/text from a DDS format (DAT) tape into the /tmp directory on the system:

    cd /tmp
    frecover -x -oF -i /home/text

    The -F option removes leading path names from all files on the tape that meet the include criteria. If there are files in the directory /tmp whose names match those coming from tape, specifying the -o option overwrites the version on disk, even if the copy on disk is newer. The /tmp directory now contains all of the files that were backed up from /home/text without the leading directories.

Examples of Restoring Data Remotely

Here are some examples of restoring data remotely (across the network):

  • To use frecover to restore files across the network, enter:

    frecover -r -vf remote-system:/dev/rmt/0m
  • To use the tar command to restore files across the network, enter:

    remsh remote-system -l user dd if=/dev/rmt/0m bs=7k \
      | tar -xvf -

    If the tar backup used relative paths, the files will be restored relative to the current directory. If absolute paths were used, the files will be restored to their original paths.

Recovering From a System Crash

IMPORTANT: To protect your data, you should create a recovery plan to be used in the event of a system crash.

You can create a recovery archive of an existing system using Ignite-UX.. To obtain the system recovery features and manpages, install Ignite-UX from the Application Release media and choose the bundle that matches your release.

For detailed information, see the Installing and Updating Ignite-UX and HP-UX 11i v3 Installation and Update Guide.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.