[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System User's Guide: Operating System and Devices

Restoring Backed-Up Files (restore Command)

You can read files written by the backup command from a backup medium and restore them on your local system with the restore or smit commands.

Notes:
  1. Files must be restored using the same method by which they were backed up. For example, if a file system was backed up by name, it must be restored by name.
  2. When more than one diskette is required, the restore command reads the one mounted, prompts you for a new one, and waits for your response. After inserting the new diskette, press the Enter key to continue restoring files.

restore Command

For example, to list the names of files previously backed up, enter:

restore -T

Information is read from the /dev/rfd0 default backup device. If individual files are backed up, only the file names are displayed. If an entire file system is backed up, the i-node number is also shown.

For example, to restore files to the main file system, enter:

restore -x -v

The -x flag extracts all the files from the backup medium and restores them to their proper places in the file system. The -v flag displays a progress report as each file is restored. If a file system backup is being restored, the files are named with their i-node numbers. Otherwise, just the names are displayed.

For example, to copy the file /home/mike/manual/chap1 , enter:

restore -xv /home/mike/manual/chap1

This command extracts the /home/mike/manual/chap1 file from the backup medium and restores it. The /home/mike/manual/chap1 file must be a name that can be displayed by the restore -T command.

For example, to copy all the files in a directory named manual, enter:

restore -xdv manual

This command restores the manual directory and the files in it. If it does not exist, a directory named manual is created in the current directory to hold the files being restored.

See the restore command in the AIX Version 4.3 Commands Reference for the exact syntax.

smit Command

The restore command can also be done using smit.

  1. At the prompt, enter:
    smit restore 
  2. Make your entry in the Target DIRECTORY field. This is the directory where you want the restored files to reside.
  3. Proceed to the BACKUP device or FILE field and enter the output device name as in the following example for a raw magnetic tape device:
    /dev/rmt0
    If the device is not available, a message similar to the following is displayed:
    Cannot open /dev/rmtX, no such file or directory.
    This message indicates that the system cannot reach the device driver because there is no file for rmtX in the /dev directory. Only items in the available state are in /dev.
  4. For the NUMBER of blocks to read in a single input field, the default is recommended.
  5. Press Enter to restore the specified file system or directory.

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]