HP-UX Containers (SRP) A.03.00 Administrator's Guide

43
Migrate a container across systems: export and import a container, then delete the original
container.
Create a copy of a container for archival purposes. Similarly, a container can be taken
offline by exporting and deleting the original container.
6.9.1 Using the srpexport command
The srp -export command exports the configuration data and optionally, specified directories, for
the specified container. To export the container, the srp -export command copies the container’s
data and stores it in the specified exchange file. The exchange file is used by the srp -import
command.
The srp -export command has the following syntax:
srp –export [container_name] [–xfile <exchange_file>] [-b[atch]]
[variable=<value>...]
Where:
container_name
Specifies the name of an existing container.
exchange_file
Specifies the exchange file name. The file is created if it does not already
exist.
The default is srp.exchange.
batch
Run srp -export in batch mode. The command will not prompt for
arguments or template variable values.
variable=value
The most commonly used variables for the export operation are
ok_export_dirs and export_copy_dirs. Setting
ok_export_dirs=yes causes the command to export the root
directory
for the container without specifying export_copy_dirs. Otherwise, set
export_copy_dirs to a comma separated list of directory names to be
copied to the exchange file. If both ok_export_dirs and
export_copy_dirs are not specified, no directories are exported, and
only the system configuration that defines the container is included in the
exchange file. This is useful for archiving the container definition, and for
cloning a container across systems where the entire container home
directory will be mounted via shared storage.
NOTE:
To export the directories mounted via the fstab
(/var/hpsrp/container_name/etc/fstab) file of the container, you must mount the
directories prior to executing the srp export command, as follows:
1. Start the container:
#srp start container_name
2. Export the container:
#srp export container_name