restwpar Command

Purpose

Restores a workload partition.

Syntax

restwpar [ -a ] [ -A ] [ -b Blocks ] [ -B devexportsFile ] [ -C ] [ -d Directory ] [ -f Device ] [ -F ] [ -h hostName ] [ -i imagedataFileName ] [ -k ] [-K] [ -M mkwparFlags ] [ -n WparName ] [ -r ] [ -s ] [ -S { a | A | f | F | n } ] [ -U ] [ -w wparSpecificationFile ]

Description

The restwpar command creates a workload partition from a workload partition backup image that was created by the savewpar, mkcd, or mkdvd command.

A workload partition backup image contains an image.data file and a workload partition specification file that are used to establish the characteristics of workload partition WparName. You can use the -i and -w flags to override these default files.

If you do not specify the -f flag, the /dev/rmt0 device is used as the input device.

If you specify a value of Yes in the EXACT_FIT field of the logical_volume_policy stanza of the /tmp/wpardata/WparName/image.data file, the restwpar command uses the map files to preserve the placement of the physical partitions for each logical volume.

Note: To view the files in the backup image or to restore individual files from the backup image, use the lssavewpar, restwparfiles, or restore command with the -T or -x flag.

Flags

Item Description
-a Automatically resolves conflicting static settings if required. Resolvable settings are name, host name, base directory, and network configuration.
-A Starts the workload partition each time when the /etc/rc.wpars command is run, which is added to the global /etc/inittab to run on each system start. The default is not to start the workload partition automatically.
-b Blocks Specifies the number of 512-byte blocks to read in a single input operation. If you do not specify the Blocks parameter, the default value of 100 is used by the restore command. Larger values result in larger physical transfers to tape devices.
-B devexportsFile Specifies an alternate file to use as the master device exports file. This file must match the format of a Device Exports File. If you do not specify a file name, the /etc/wpars/devexports file is used.
-C Forces the creation of the named workload partition, even when a compatibility check fails between the system from the backup image and the system where the backup is being restored.

If the workload partition is not compatible with the target system, it might not be operable.

-d Directory Specifies a base directory for this workload partition. If you do not specify a directory name, the directory name from the WPAR specification file is used.
-f Device Specifies the device name of the backup media. The default value is /dev/rmt0.
-F Forces the creation of the named workload partition. If the named workload partition already exists, it is stopped if active, and then removed, before the new workload partition is created.
-h hostname Specifies a host name for this workload partition. If not specified, the mkwpar command uses the workload partition name for the host name.
-i imagedataFileName An optional flag that specifies a file name. The file is used as the image.data file instead of the one contained within the backup image that is being restored.
-k Creates logical volumes with minimum sizes from the backup.
-K Creates the post-installation customization script.
-M mkwparFlags Specifies additional flags to pass directly to the mkwpar command to create the workload partition. The -M flag is used to pass other flags to the mkwpar command. If a flag is passed through its own option and through the -M flag, both flags are passed to the mkwpar command.
Note: The mkwparFlags value cannot include the -i and -f flags as these flags are reserved for use by the restwpar command. Specifying the -i or -f flag as the mkwparFlags value will cause an error.
-n WparName Specifies the name for the workload partition to be created. If you do not specify the -n flag, the WparName is taken from the WPAR specification file.
-r Duplicates the network name resolution configuration from the global system. The following files, if they exist, are copied into the workload partition:
  • /etc/resolv.conf
  • /etc/hosts
  • /etc/netsvc.conf
  • /etc/irs.conf
  • /etc/networks
If the NSORDER environment variable is defined in the calling environment, it is added to the /etc/environment file of the workload partition.
-s Starts the workload partition after it is created.
-S { a | A | f | F | n } Specifies the type of synchronization to use after files are restored from the backup to synchronize the levels of software in the workload partition with the levels of the software in the global environment.
a
Causes additional installations with no removal of software. This is the default.
A
Causes additional installations with no removal of software, and ignores any errors in synchronization.
Important: If you specify -S A, the workload partition might be in an unusable state.
f
Causes additional installations, as well as software rejection and deinstallation.
F
Causes additional installations, as well as software rejection and deinstallation, and ignores any errors in synchronization.
Important: If you specify -S F, the workload partition might be in an unusable state.
n
Prevents the synchronization processing after the files are restored.
Important: If you specify -S n, the workload partition might be in an unusable state.
-U Specifies that the existing MAP files are ignored. The -U flag overrides the value of the EXACT_FIT field in the logical_volume_policy stanza of the WparName.data file.
-w wparSpecificationFile An optional flag that specifies a file name. The file is used as the WPAR specification file rather than the version in the WPAR backup image by the mkwpar command.

Examples

  1. To restore the workload partition image from the /dev/rmt1 device, enter the following command:
    restwpar -f/dev/rmt1
  2. To restore the workload partition image that is saved in the /mydata/wpar.img file with name mywpar and base directory /wpars/mywpar, enter the following command:
    restwpar -f/mydata/wpar.img -n mywpar -d /wpars/mywpar
  3. To restore the workload partition image from the /dev/usbms0 device, enter the following command:
    restwpar –f /dev/usbms0