Backup a WPAR:
[root@lpar01:/mksysb]# /usr/bin/savewpar -i -B -e -f /mksysb/<wpar_name>_<lpar_name>.savewpar <wpar_name>
Clone a WPAR:
After a savewpar, you have a full backup of the WPAR. To be able to restore it in a new WPAR with new IP and hostname, first extract spec file from sawpar file.
[root@lpar01:/mksysb]# restore -xqvf <savewpar_file> ./.savewpar_dir/wpar.spec
Edit the spec file to change hostname, ip address, filesystems if needed
Then restore the savewpar file:
[root@lpar01:/mksysb]# /usr/bin/restwpar -f <savewpar_file> -v [-w <spec_file>]
At the end allow printing from WPAR (bug):
[root@lpar01:/mksysb]# chwpar -S privs+=PV_DOM_SELF <wpar_name>
Start the WPAR:
[root@lpar01:/mksysb]# startwpar -v <wpar_name>
Example for creating a WPAR specification file from an existing WPAR…
Create a new specification file /tmp/wpar2.spec based upon existing WPAR wpar1…
[root@lpar01:/mksysb]# mkwpar -e wpar1 -o /tmp/wpar2.spec -w
NOTE: this command does not create a new WPAR, it only creates a new specification file containing configuration information identical to the existing WPAR it was created from.
Example of creating a WPAR Specification file only, without creating a new WPAR…
Create a specification file /tmp/mywpar.spec based upon command line arguments…
[root@lpar01:/mksysb]# mkwpar -n mywpar -h mywpar -N interface=en0 address=<ip addr> netmask=255.255.255.0 -r -A -s -o /tmp/mywpar.spec -w
NOTE: this command does not create a new WPAR, it only creates a new specification file containing configuration information based upon the command line arguments.
Example of creating a new WPAR based upon an existing specification file…
Create a new WPAR based upon the values within the given specification file…
[root@lpar01:/mksysb]# mkwpar -f /tmp/mywpar.spec
This will create a new WPAR using the WPAR name and configuration specified within the specification file /tmp/mywpar.spec. To use this specification file for creating multiple WPARs with unique names, hostnames and IP addresses, you can additionally provide command line arguments which will override those values within the specification file….
[root@lpar01:/mksysb]# mkwpar -f /tmp/mywpar.spec -n wpar2 -h wpar2.company.com -N address=192.168.100.10