Restores the user volume group and all its containers and files.
restvg [ -b Blocks ] [ -d FileName ][ -f Device ] [ -l ] [ -q ] [ -r ] [ -s ] [ -n ] [ -P PPsize ] [ DiskName ... ]
The restvg command restores the user volume group and all its containers and files, as specified in the /tmp/vgdata/vgname/vgname.data file (where vgname is the name of the volume group) contained within the backup image created by the savevg command.
The restvg command restores a user volume group. The bosinstall routine reinstalls the root volume group (rootvg). If the restvg command encounters a rootvg volume group in the backup image, the restvg command exits with an error.
Item | Description |
---|---|
-b Blocks | Specifies the number of 512-byte blocks to read in a single input operation. If this parameter is not specified the default of 100 is used by the restore command. Larger values result in larger physical transfers to tape devices. |
DiskName... | Specifies the names of disk devices to be used instead of the disk devices listed in the vgname.data file. Target disk devices must be defined as empty physical volumes; that is, they must contain a physical volume identifier and must not belong to a volume group. If the target disk devices are new, they must be added to the system using the mkdev command. If the target disk devices belong to a volume group, they must be removed from the volume group using the reducevg command. |
-d FileName | The -d flag is an optional flag, which, if specified, must be followed by a filename. This file will be used as the vgname.data file instead of the one contained within the backup image being restored. The filename can be specified by either a relative or an absolute pathname. |
-f Device | Specifies the device name of the backup media. The default is /dev/rmt0. |
-l | Displays useful information about a volume group backup. This flag requires the -f device flag. This flag causes restvg to display information such as volume group, date and time backup was made, uname output from backed up system, oslevel, recommended maintenance and technology level, backup size in megabytes, and backup shrink size in megabytes. The shrink size is the size of the data on all filesystems. The full size is the total size of each filesystem (unused + data). The -l flag also displays the logical volume and filesystem information of the backed up volume group, equivalent to running "lsvg -l vgname". |
-n | Specifies that the existing MAP files are ignored. The -n flag overrides the value of the EXACT_FIT field in the logical_volume_policy stanza of the vgname.data file. |
-P PPsize | Specifies the number of megabytes in each physical partition.
If not specified, restvg uses the best value for the PPsize,
dependent upon the largest disk being restored to. If this is not
the same as the size specified in the vgname.data file,
the number of partitions in each logical volume will be appropriately
altered with respect to the new PPsize. If a PPsize is specified that is smaller than appropriate for the disk sizes, the larger PPsize will be used. If a PPsize is specified that is larger than appropriate for the disk sizes, the specified larger PPsize will be used. |
-q | Specifies that the usual prompt not be displayed before the restoration of the volume group image. If this flag is not specified, the prompt displays the volume group name and the target disk-device names. |
-r | Recreates a volume groups structure only. This allows restvg
to create (for the specified backup FileName or Device)
the volume group, logical volumes, and filesystems, from the backup,
without restoring any files or data. This is useful for users who
use third party software for restoring data and just need all the AIX® logical volume structure
in place. Note: be used with either the -f Device flag
or the -d FileName flag. This is because restvg requires
a backup image or vgname.data file to get all the information
it needs to recreate the logical volume structure of the volume group
desired.
|
-s | Specifies that the logical volumes be created at the minimum
size possible to accommodate the file systems. This size is specified
by the value of LV_MIN_LPS field of the lv_data stanza
of the vgname.data file (where vgname is the
name of the volume group). The -s flag overrides the values of the SHRINK and EXACT_FIT fields in the logical_volume_policy stanza of the vgname.data file. The -s flag causes the same effect as values of SHRINK=yes and EXACT_FIT=no would cause. |
restvg -f/dev/rmt1 hdisk2 hdisk3
restvg -f/mydata/myvg
restvg -r -d /home/my_dir/my_vg.data
restvg -r -f /dev/rmt0
restvg -l -f /dev/rmt0
restvg –f /dev/usbms0