[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Commands Reference, Volume 4
restvg Command
Purpose
Restores the user volume group and all its containers
and files.
Syntax
restvg [ -b Blocks ] [ -d FileName ][ -f Device ] [ -l ] [ -q ] [ -r ]
[ -s ]
[ -n ]
[ -p PPsize ] [ DiskName ... ]
Description
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.
If a yes value has been specified in the EXACT_FIT field of the logical_volume_policy stanza
of the /tmp/vgdata/vgname/vgname.data file,
the restvg command uses the map files to preserve the
placement of the physical partitions for each logical volume. The target disks
must be of the same size or larger then the source disks specified in the source_disk_data stanzas of the vgname.data file.
Note
To view the files in
the backup image or to restore individual files from the backup image, the
user must use the restore command with the -T or -x flag, respectively. (Refer to the restore command for more information.)
Flags
-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 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. |
Examples
- To restore the volume group image from the /dev/rmt1 device, onto the hdisk2 and hdisk3 disks, enter:
restvg -f/dev/rmt1 hdisk2 hdisk3
- To restore the volume group image saved in /mydata/myvg file onto the disks specified in the vgname.data file contained within the backup image,
enter:
restvg -f/mydata/myvg
- To recreate the volume group logical volume structure without restoring
any files using only the vgname.data file /home/my_dir/my_vg.data, enter:
restvg -r -d /home/my_dir/my_vg.data
Note
vgname.data files can be created for a volume group by using the mkvgdata command.
- To recreate the volume group logical volume structure without restoring
any files using the vgname.data file
inside of the volume group backup located on the tape in /dev/rmt0, enter the following:
restvg -r -f /dev/rmt0
- To display volume group information about the volume group backed up on
the tape in /dev/rmt0, enter:
restvg -l -f /dev/rmt0
Related Information
The mkvgdata command, restore command, savevg command, mkdev command, reducevg command.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]