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:Device [ FileSystem ... ] [ 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
Item | Description |
---|---|
-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 rmtspecial 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:
|
-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 mkfscommand 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:
Item | Description |
---|---|
0 | Successful completion. |
>0 | An error occurred. |
Security
Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
Examples
- To list files from a remote tape device, enter: This command reads information from the /dev/rmt0 device on remote machine1. The file names are shown.
- To restore files, enter: This command extracts the /home/mike/file1 file from the backup medium on the /dev/rmt0 device on remote machine1.
- To restore all the files
in a directory, enter:
This command restores the directory /home/mike and all the files it contains.rrestore -fhost:/dev/rmt0 -x /home/mike
- To restore a directory,
but not the files in the directory, enter:
rrestore -fhost:/dev/rmt0 -x -h /home/mike
- To restore all the files
in a directory from a specific backup on a multibackup medium, enter:
This command restores the /home/mike directory and all the files it contains from the third backup on the backup medium.rrestore -s3 -fhost:/dev/rmt0.1 -x /home/mike
Files
Item | Description |
---|---|
/dev/rfd0 | Specifies the default restore device. |
/usr/sbin/rrestore | Contains the rrestore command. |