2.3 cloneDeployments

Use with WLST: Online or Offline

Description

Replicates all deployments targeted to a particular Managed Server or cluster on a second Managed Server or cluster. This command is provided as a convenience to configure a new Managed Server or cluster so that it has the same deployments as a pre-existing Managed Server or cluster.

The cloneDeployments command does not create new Managed Servers, and it does not copy properties other than deployment information to the target Managed Server.

Syntax

cloneDeployments(domain, source, target, [shouldUpdateDomain])

Argument Definition
domain

The absolute path of the WebLogic Server domain. Ignored if the domain has been read, or if connected in online mode.

source

The name of the Managed Server or cluster from which you want to clone deployments. This must be the name of a valid Managed Server or cluster.

target

The target Managed Server or cluster that will receive the source server's applications and services. The target Managed Server must already exist.

shouldUpdateDomain

An optional boolean flag that controls how domain updates are carried out. When you set it to true (the default), the function implicitly invokes the following offline commands: readDomain() and updateDomain(), or online commands: edit(), startEdit(), save(), and activate(). When you set it to false, you must call WLST commands to update the domain.


Example

The following example replicates the deployments from sourceServer to destinationServer:

wls:/offline> cloneDeployments( '/my_path/user_templates/domains/my_domain',
 'sourceServer','destinationServer', 'false')