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

Commands Reference, Volume 4


rrestore Command

Purpose

Copies previously backed up file systems from a remote machine's device to the local machine.

Syntax

rrestore-bNumber ] [  -h ] [  -i ] [  -m ] [  -sNumber ] [  -t ] [  -v ] [  -y ] [  -x ] [  -r ] [  -R ] -fMachine:DeviceFileSystem ... ] [ File ... ]

Description

The rrestore command restores Version 3 by i-node backups from a remote machine's device to a file system on the local machine. The rrestore command creates a server on the remote machine to the backup medium.

The rrestore command only accepts backup formats created when a file system is backed up by i-node.

Note: A user must have root authority to execute this command.

Flags


-bNumber Specifies the number of blocks to read in a single input operation. If you do not specify this flag, the rrestore command selects a default value appropriate for the physical device you have selected. Larger values of the Number variable result in larger physical transfers from tape devices.
-fMachine:Device Specifies the input device on the remote machine. Specify the Device variable as a file name (such as the /dev/rmt0 file) to get input from the named device. For more information on using tape devices see the rmt special file.
-h Restores only the actual directory named by the File parameter, not the files contained in that directory. This option is ignored when either the -r or -R flag is specified.
-i Starts the interactive mode. This flag allows you to restore selected files from the directory represented by the File parameter. The subcommands for the -i flag are:

ls [Directory]
Displays directory names within the specified Directory parameter with a / (slash) after the name, and displays files to be restored with an * (asterisk) before the name. If the -v flag is used, the i-node number of each file and directory is also displayed. If the Directory1 parameter is not specified, the current directory is used.

cd Directory
Changes the current directory to the Directory parameter.

pwd
Displays the full path name of the current directory.

add [File]
Specifies the File parameter to restore. If the File parameter is a directory, that directory and all its files are restored (unless the -h flag is used). Files to be restored are displayed with an * (asterisk) before the name by the ls subcommand. If the File parameter is not specified, the current directory is used.

delete [File]
Specifies the File parameter to ignore in restore. If the File parameter is a directory, the directory and all its files are not restored (unless the -h flag is used). If the File parameter is not specified, the current directory is used.

extract
Restores all files displayed with an * (asterisk) before the name by the ls subcommand.

setmodes
Sets owner, modes, and times for the files being restored rather than using this information as it resides on the backup medium.

verbose
Displays the i-node numbers of all restored files with the ls subcommand. Information about each file is also displayed as it is restored. The next invocation of the verbose subcommand turns verbose off.

help
Displays a summary of the subcommands.

quit
Stops execution of the rrestore command immediately, even if all files requested have not been restored.
-m Restores files by i-node number rather than by path name.
-r Restores an entire file system.

Attention: If you do not follow this procedure carefully, you can ruin an entire file system. If you are restoring a full (level 0) backup, run the mkfs command to create an empty file system before doing the restore. To restore an incremental backup at level 2, for example, run the mkfs command, restore the appropriate level 0 backup, restore the level 1 backup, and finally restore the level 2 backup. As an added safety precaution, run the fsck command after you restore each backup level.
-R Causes the rrestore command to request a specific volume in a multivolume set of backup medium when restoring an entire file system. The -R flag provides the ability to interrupt and resume the rrestore command.
-sNumber Specifies which backup to restore from a multibackup medium. Numbering starts with 1.
-t Displays the table of contents for the backed up files. The rrestore command displays the file name. The names are relative to the root ( / ) directory of the file system backed up. The only exception is the root ( / ) directory itself.
-v Reports the progress of the restoration as it proceeds.
-x Restores individually named files. If no names are given, all files on that medium are restored. The names must be in the same form as the names shown by the -t flag.
-y Prevents the rrestore command from asking whether it should stop the restore if a tape error is encountered. The rrestore command attempts to skip over bad blocks.
-? Displays the usage message.

Exit Status

This command returns the following exit values:

0 Successful completion.
>0 An error occurred.

Examples

  1. To list files from a remote tape device, enter:
    rrestore  -fmachine1:/dev/rmt0  -t
    This command reads information from the /dev/rmt0 device on remote machine1. The file names are shown.
  2. To restore files, enter:


    rrestore  -x  -fmachine1:/dev/rmt0 /home/mike/file1 
    This command extracts the /home/mike/file1 file from the backup medium on the /dev/rmt0 device on remote machine1.

  3. To restore all the files in a directory, enter:

    rrestore -fhost:/dev/rmt0 -x /home/mike
    

    This command restores the directory /home/mike and all the files it contains.

  4. To restore a directory, but not the files in the directory, enter:

    rrestore -fhost:/dev/rmt0 -x -h /home/mike
    
  5. To restore all the files in a directory from a specific backup on a multibackup medium, enter:

    rrestore -s3 -fhost:/dev/rmt0.1 -x /home/mike
    

    This command restores the /home/mike directory and all the files it contains from the third backup on the backup medium.

Files


/dev/rfd0 Specifies the default restore device.
/usr/sbin/rrestore Contains the rrestore command.

Related Information

backup command, rdump command, restore command, mkfs command, fsck command, dd command.

filesystems file, backup file, rmt special file.

Backup Overview for System Management in AIX 5L Version 5.1 System Management Guide: Operating System and Devices.

File Systems Overview for System Management in AIX 5L Version 5.1 System Management Guide: Operating System and Devices.

Directory Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices.

Files Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices.


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