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 is 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.
If user volume groups are configured with a rootvg WPAR, then they are not automatically imported after restoring a rootvg WPAR.
-T
or
the -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 a substitute file that can be used 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. If the operating system of the global system is at a later technology level or service pack level than the WPAR that has different modification or fix levels in the VRMF (version, release, modification and fix level), the workload partition (WPAR) can be synchronized with the new global system. Different factors affect the success of the synchronization. Review the logs after the synchronization operation is complete. Any updates that are applied to the new global system must be committed, and the updates to the WPAR must be committed before you back up the WPAR. If the new global system is installed on a system that is running AIX 6100-08 or 7100-02 technology levels, or earlier, you must run the cp_bos_updates command before you restore the workload partition for the synchronization to work. |
-d Directory |
Specifies a base directory for the 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 exists, it is stopped if active, and then removed, before the new workload partition is created. |
-h hostname |
Specifies a host name for theworkload 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 theimage.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 the 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 causes 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:
|
-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.
|
-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
- To restore the workload partition image
from the /dev/rmt1 device, enter the following
command:
restwpar -f/dev/rmt1
- 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
- To restore the workload partition image
from the /dev/usbms0 device, enter the following
command:
restwpar -f/dev/usbms0