HP-UX Secure Resource Partitions (SRP) A.02.02 Administrator's Guide
85
17 Exporting and Importing SRPs
You can export and import an SRP across systems by using the srp –export and srp -import
commands. These commands allow you to accomplish the following:
• Create a clone of an SRP on a secondary system for high availability or load balancing
purposes.
• Migrate an SRP across systems: export and import an SRP, then delete the original SRP.
• Create a copy of an SRP for archival purposes. Similarly, an SRP can be taken offline by
exporting and deleting the original SRP.
This chapter discusses the following:
• 17.1 Using the srp –export Command
• 17.2 Using the srp –import Command
• 17.3 Best practices for Exporting and Importing an SRP
17.1 Using the srp –export Command
The srp -export command exports the configuration data and optionally, specified directories, for
the specified SRP compartment. To export the SRP, the srp -export command copies the SRP’s
data and stores it in the specified exchange file. The exchange file is used by the srp -import
command. You can only export an SRP that is in a stopped state.
The srp -export command has the following syntax:
srp –export [<srp_name>] [–xfile <exchange_file>]
[-b[atch]] [variable=<value>...]
The options are as follows:
srp_name
Specifies the name of an existing SRP compartment.
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 variable for the export operation is
export_copy_dirs. It is a comma separated list of directory names to
be copied to the exchange file. If export_copy_dirs is not specified,
no directories are exported, and only the system configuration that defines
the SRP is included in the exchange file. This is useful for archiving the SRP
definition, and for cloning an SRP across systems where the entire SRP
home directory will be mounted via shared storage.
NOTE:
• To export the directories mounted via the fstab (/var/hpsrp/<srp_name>/etc/fstab)
file of the SRP, you must mount the directories prior to executing the srp –export
command, as follows:
1. Mount the fstab filesystems of the SRP:
#export compartment=<srp_name>