WebLogic Domains containing manage servers can be extended to different servers. To do this, weblogic comes with the pack and unpack tools. The tools are located at
11g
$MW_HOME\wlserver_10.3\common\bin
12c
$MW_HOME\wlserver\common\bin
PACK Command
The pack
command creates a template archive (.jar
) file that contains a snapshot of either an entire domain or a subset of a domain. You can use a template that contains a subset of a domain to create a Managed Server domain directory hierarchy on a remote machine.
When you create this type of template . . | The following occurs . . . | ||
---|---|---|---|
Domain |
All files and directories in the source domain are included, with the following exceptions:
|
||
Managed Server (using the -managed=true option) |
The following files and directories are included by default:
The following files and directories are not included in a Managed Server template by default:
|
Example
pack -domain=/d0/oracle/middlware/user_projects/domains/mydomain -template=/d0/oracle/middlware/user_templates/mydomain.jar -template_name="My WebLogic Domain"
UNPACK Command
Creates a full domain or a subset of a domain used for a Managed Server domain directory on a remote machine. You may use unpack
only with a template compatible with your current installation. The template can be any of the following:
- A domain template provided by BEA and packaged with your current installation
- A domain template created using the Domain Template Builder or WLST Offline
- A domain template created using the pack command
- A Managed Server template created using the pack command. A Managed Server template, by default, contains only the files necessary for creating a Managed Server domain directory.
When you use the unpack command with a domain template, it creates a domain containing all of the application and resource files defined in the template. It also creates necessary start scripts, and certain security and configuration files.
When you use the unpack
command with a Managed Server template, it creates a Managed Server domain directory that includes the following:
- A customized start script for each Managed Server in the domain
- A
config_bootstrap.xml
file (based on theconfig.xml
in the template) - A
nm_password.properties
file - A
SerializedSystemIni.dat
file
Example
unpack -template=/d0/oracle/middleware/user_templates/mydomain.jar -domain=/d0/oracle/middleware/user_projects/domains/my_new_domain