Copy Instance

Using REST you can copy an existing instance of an application. The JMX username and password is governed by policy in the CDD file. It is supported only when you are using deployment with TIBCO Enterprise Administrator mode.

Here is a generic cURL example that copy an existing instance of an application:
curl -u <USER>:<PASSWORD> -X POST -H "Accept: application/json" 
-H "Content-Type: multipart/form-data" 
-v "<BROKER_URL>:<BROKER_PORT>/livecluster/rest/v1/sf/engines/<DAEMON_ID>/<ENGINE_INSTANCE>/archives" 
-F "archiveFile=@<ARCHIVE_FILE>" -F "COMMAND=copyinstance" -F "INSTANCENAME=<INSTANCE_NAME>" 
-F "NEWINSTANCENAME=<NEW_INSTANCE_NAME>" -F "PUID=<PU>" -F "JMX_PORT=<JMX_PORT>"
-F "JMXUSER=<JMX_USER>" -F "JMXPASSWORD=<JMX_PASSWORD>" 
-F "BEHOME=<BE_HOME>

Here,

COMMAND: copyinstance

archiveFile: The application ear file.

INSTANCENAME : The application instance name.

NEWINSTANCENAME : The new application instance name.

PUID : The processing unit name.

JMX_PORT : The JMX port number.

JMXUSER (optional) : The JMX user name

JMXPASSWORD (optional) The JMX password

BEHOME: (optional): BusinessEvents Home

Note: These commands need to be run in the same directory where the ear file is, similar to the regular archive deployment.