[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

System User's Guide: Operating System and Devices

Restoring Backed-Up Files (restore Command)

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

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 diskette that is 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.

Using the restore Command

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

restore -T

Press Enter.

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, type:

restore -x -v

Press Enter.

The -x flag extracts all the files from the backup media 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, only the names are displayed.

For example, to copy the /home/mike/manual/chap1file , type:

restore -xv /home/mike/manual/chap1

Press Enter.

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 the restore -T command can display.

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

restore -xdv manual

Press Enter.

This command restores the manual directory and the files in it. If the directory 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 5L Version 5.2 Commands Reference for the complete syntax.

Using the smit Command

You can also use smit to run the restore command.

  1. At the prompt, type:

    smit restore 

    Press Enter.

  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 type the output device name, and press Enter, 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 the/devdirectory.

  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.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]