Oracle® Fusion Middleware Administrator's Guide 11g Release 1 (11.1.1) E10105-01 |
|
![]() Previous |
![]() Next |
You can clone a Middleware home or an Oracle home, as well as Oracle Internet Directory and Oracle Virtual Directory.
This chapter includes the following topics:
Cloning is the process of copying an existing entity to a different location while preserving its state. Some situations in which cloning Oracle Fusion Middleware is useful are:
Creating a Middleware home or Oracle home that is a copy of a production, test, or development environment. Cloning enables you to create a new Middleware home or an Oracle home with all patches applied to it in a single step. This is in contrast to separately installing, configuring and applying any patches to separate Oracle homes.
Preparing a "gold" image of a patched home and deploying it to many hosts.
The cloned entity behaves the same as the source entity. For example, a cloned Oracle home can be deinstalled or patched using the installer. It can also be used as the source for another cloning operation.
You can clone the following, on the same host or a different host:
Middleware home: You can apply the clone of the Middleware home to the same host or a different host. The clone must be on the same operating system as the source.
Oracle home: You can apply the clone of an Oracle home to the same Middleware home or to a different Middleware home, which can be on the same host or a different host. The clone must be on the same operating system as the source.
If you are applying the clone of an Oracle SOA Suite or Oracle WebCenter Oracle home, ensure that the same type of Oracle home is not present in that Middleware home. That is, you can have only one Oracle SOA Suite Oracle home in a Middleware home and you can have only one Oracle WebCenter Oracle home in a Middleware home.
Oracle Internet Directory: You can clone Oracle Internet Directory to a different Oracle instance, in the same Middleware home or a different Middleware home, on the same host or a different host. You cannot clone it to the same Oracle instance.
Oracle Virtual Directory: You can clone Oracle Virtual Directory to a different Oracle instance, in the same Middleware home or a different Middleware home, on the same host or a different host. You cannot clone it to the same Oracle instance.
See Section 17.6 for details of considerations and limitations affecting specific components.
When you clone an entity of Oracle Fusion Middleware, the cloning process takes a snapshot of the information required for cloning. The following topics describe the cloning process:
At the source, you run the createClone command, specifying the Middleware home, Oracle home, or component that you want to clone. The program prepares the source for cloning and creates an archive. It also records the file permissions of the Middleware home or Oracle home.
By default, if you are creating a clone of a Middleware home, the archive contains all of the Oracle homes and Oracle WebLogic Server homes in the Middleware home.
If you are creating a clone of an Oracle home, the archive contains the Oracle home.
If you are creating a clone of Oracle Virtual Directory or Oracle Internet Directory, the archive contains the component.
At the destination, you run a clone command, specifying either the Middleware home or Oracle home and the destination. The clone program checks to see that the prerequisites are met at the destination. It extracts the files from the archive file and registers the Oracle homes with the installer and registers WebLogic Server homes with the Middleware home.
The clone program then restores the file permissions and relinks any files if that is necessary.
Cloning uses a Java program, which is located in:
(UNIX) ORACLE_HOME/jlib/cloningclient.jar (Windows) ORACLE_HOME\jlib\cloningclient.jar
The syntax is:
java [-d64] -jar ORACLE_HOME/jlib/cloningclient.jar cloning_command options
Use the -d64 option to the java command if the operating system is Sun Solaris SPARC (64-bit).
Note: If you are applying the clone of a Middleware home or an Oracle home on a host that does not yet have Oracle Fusion Middleware installed, the host must have JDK 1.6 or higher installed. In addition, the PATH, CLASSPATH, and JAVA_HOME environment variables must point to the JDK. |
Cloning Commands
This section describes the cloning commands. The options are described in the tables that follow the syntax.
Note that all cloning commands ask you if you want to continue whenever the -silent true
option is not used. To continue, you must type Yes
, which is not case sensitive. Any words other than Yes
causes the cloning command to return an error. Also note that, even in silent
mode, the commands prompt for passwords if they are not provided where they are needed.
Creates an archive file of a Middleware home, an Oracle home, or a component.
The syntax differs depending on what you are cloning.
The syntax for creating a clone of a Middleware home or Oracle home is:
createClone -archiveLocation archive_location {-sourceMWHomeLoc MW_HOME | sourceOracleHomeLoc src_OH_1[,src_OH_2 ...]} [-excludeOracleHomes {true | false} ] [-invPtrLoc Oracle_InventoryLocation] [-mwHomeValidation {true | false}] [-excludePattern pattern_in_double_quotes] [-excludePatternFile file_path] [-logDirLoc log_dir_path] [-silent {true | false}] ]
The syntax for creating a clone of a component is:
createClone -archiveLocation archive_location -sourceInstanceHomeLoc src_instance_path -sourceComponentName src_component_name [-logDirLoc log_dir_path] [-silent {true | false} ]
You cannot create a clone of a component in the same operation as when you create a clone of a Middleware home and Oracle home.
Lists the source ID (a unique representation of each entry). You use the source ID in the applyClone command. The syntax is:
listCloneArchive -archiveLocation archive_location [-logDirLoc log_dir_path]
Applies the clone. If you are cloning a Middleware home, you can apply the clone to the same host or a different host. If you are cloning an Oracle home, you can apply the clone to the same Middleware home or a different middleware home (on the same host or a different host.) If you are cloning Oracle Virtual Directory or Oracle Internet Directory, you can apply the clone to a different Oracle instance, in the same Middleware home or a different Middleware home (on the same host or a different host). You cannot clone it to the same Oracle instance.
The syntax differs depending on what you are cloning.
The syntax for applying the clone of a Middleware home or Oracle home is:
applyClone -archiveLocation archive_location -targetLocation target_location [-sourceID source_id[,source_id...] ] [-mwHomeValidation {true | false}] [-executeSysPrereqs {true | false}] [-logDirLoc log_dir_path] [-javaHome java_home_location] [-silent {true | false}]
The syntax for applying the clone of a component, such as Oracle Internet Directory or Oracle Virtual Directory is:
applyClone -archiveLocation archive_location [-sourceID source_id] -targetComponentName trgt_component_name -targetInstanceHomeLoc trgt_Instance_path [-targetInstanceName trgt_Instance_name] [-targetMWHomeLoc trgt_location] [-targetOracleHomeLoc trgt_ORACLE_HOME_path] [-silent {true | false}] [ <Domain Detail> ] {<Oracle Internet Directory Detail> | <Oracle Virtual Directory Detail> } <Domain Detail> = -domainHostName domain_host_name -domainPortNo domain_port_number -domainAdminUserName domain_admin_username -domainAdminPassword domain_admin_password <Oracle Internet Directory Detail> = -dbHostName database_host_name -dbPortNo database_port_number -dbServiceName databaseServiceName -namespace namespace -odsSchemaPassword ods_schema_password -odssmSchemaPassword odssmSchema_password -oidAdminPassword oid_admin_password [-oidNonSSLPort oid_port ] [-oidSSLPort oid_ssl_port ] ] <Oracle Virtual Directory Detail> = -namespace namespace -ovdAdmin ovd_admin_name -ovdAdminPassword ovd_admin_password -isOvdAdminSSLEnable true_or_false [-isOvdHttpSSLEnable true_or_false ] [-ovdAdminPort ovd_admin_port ] [-ovdHttpPort ovd_http_port ] [-ovdLdapPort ovd_ldap_port ] [-ovdLdapSPort ovd_ldap_ssl_port ]
Table 17-1 describes the options for using the createClone command for a Middleware home or Oracle home.
Table 17-1 Options for the createClone Command for a Middleware Home or Oracle Home
Options | Shortcut | Description | Mandatory or Optional |
---|---|---|---|
-archiveLocation |
-al |
The absolute path of the archive location. Use this option to specify the location of the archive file to be created with the createClone command. |
Mandatory |
-excludeOracleHomes |
-exoh |
Option to specify whether all Oracle homes present in the Middleware home will be excluded. To exclude the Oracle homes, specify this option with the value You can use this option only when you use the -sourceMWHomeLoc option. The default is false. In that case, all Oracle homes are included. |
Optional |
-excludePattern |
-exp |
The pattern of the files that should be excluded from the archive. You specify the files by providing a pattern of the file names. The pattern must be enclosed in quotation marks. For example: "*.log,*.bak" You can use this option with excludePatternFile or separately. |
Optional |
-excludePatternFile |
-expf |
The path of a file that contains the pattern of the files to be excluded from the archive. For example, create a file named excl_pat.txt and pass its path to this option. Insert the patterns in the file, as shown in the following example: *.log *.bak # My comments You can use this option with excludePattern or separately. |
Optional |
-invPtrLoc |
-invLoc |
The absolute path to the Oracle Inventory pointer. Use this option when creating a clone of an Oracle home, if the inventory location is not in the default location, so that the operation can read the Oracle homes present in the inventory. You can use this option only when you use the -sourceMWHomeLoc option. If you specify -excludeOracleHomes, this parameter is ignored. (On Linux, the default location is /etc/oraInst.loc.) |
Optional, if the inventory is in the default location or the excludeOracleHomes option is used. Otherwise, it is mandatory. |
-logDirLoc |
-ldl |
The location of an existing directory. A new log file is created in the directory. The default is the system Temp location. |
Optional |
-mwHomeValidation |
-mwhv |
Specifies whether or not the operation checks that the parent of the Oracle home is the Middleware home. The default is that it checks for the parent. To specify that it does not check, specify this option with the value of If the Oracle home contains Oracle SOA Suite, Oracle WebCenter, Oracle Forms Services, Oracle Reports, or Oracle Business Intelligence Discoverer, the parent of the Oracle home must be the Middleware home. |
Optional |
-silent |
NA |
Specifies whether or not the clone operation operates silently. That is, it does not prompt for confirmation. The default is that the operation prompts for confirmation. To specify that it not prompt for confirmation, specify this option with the value of |
Optional |
-sourceMWHomeLoc |
-smw |
The absolute path of the Middleware home. Use this option to specify the Middleware home to be archived. You can only specify one Middleware home. If you specify this option and -sourceOracleHomeLoc, only the Oracle homes present in the specified Middleware home and listed in the option -sourceOracleHomeLoc will be archived, along with the Oracle WebLogic Server binary files. |
Either this option or sourceOracleHomeLoc must be specified. |
-sourceOracleHomeLoc |
-soh |
The absolute path of an Oracle home. Use this option to specify the Oracle homes to be archived. To specify multiple Oracle homes, use a comma-delimited list, with no spaces between Oracle homes. For example: sourceOracleHomeLoc MW_HOME/oh1,MW_HOME/oh2 If you specify this option with -sourceMWHomeLoc, all of the Oracle homes specified must be children of the Middleware home. If you specify this option without -sourceMWHomeLoc, only the specified Oracle homes will be archived, but they must be children of a Middleware home. If you specify this option and specify that -mwHomeValidation is false, the specified Oracle homes will be archived, even if they are not children of a Middleware home. |
Either this option or -sourceMWHomeLoc must be specified. |
Table 17-2 describes the options for using the applyClone command for a Middleware home or Oracle home.
Table 17-2 Options for the applyClone Command for a Middleware Home or Oracle Home
Options | Shortcut | Description | Mandatory or Optional |
---|---|---|---|
-archiveLocation |
-al |
The absolute path of the archive location. Use this option to specify the location of the archive file created with the createClone command. The archive will be restored either fully or partially, depending on the sourceID values specified. |
Mandatory |
-executeSysPrereqs |
-exsysprereqs |
Specifies whether or not the applyClone operation checks the prerequisites of the Oracle home. The default is that it checks the prerequisites. To specify that it does not check the prerequisites, specify this option with the value |
Optional |
-invPtrLoc |
-invLoc |
The absolute path to the Oracle Inventory pointer. (On Linux, the default location is /etc/oraInst.loc.) |
Optional, if the inventory is in the default location. Otherwise, it is mandatory. |
-javaHome |
-javaHome |
If the source Middleware home was installed without JDK and Oracle JRockit and the cloningclient program is launched from the JRE home, specify this option to configure the Middleware home. |
Optional |
-logDirLoc |
-ldl |
The location of an existing directory. A new log file is created in the directory. The default is the system Temp location. |
Optional |
-mwHomeValidation |
-mwhv |
Specifies whether or not the operation checks that the parent of the Oracle home is the Middleware home. The default is that it checks for the parent. To specify that it does not check, specify this option with the value of If the Oracle home contains Oracle SOA Suite, Oracle WebCenter, Oracle Forms Services, Oracle Reports, or Oracle Business Intelligence Discoverer, the parent of the Oracle home must be the Middleware home. |
Optional |
-silent |
NA |
Specifies whether or not the clone operation operates silently. That is, it does not prompt for confirmation. The default is that the operation prompts for confirmation. To specify that it not prompt for confirmation, specify this option with the value of |
Optional |
-sourceID |
-so |
The source ID, a unique identifier for each entity in the archive, of the entity to restore. To apply the entire archive to the clone, specify To specify multiple source IDs, use a comma-delimited list, with no spaces between IDs. For example: -sourceID id1,id2 If you are cloning multiple Oracle homes, the number of source IDs must be the same as the number of Oracle homes specified in the targetLocation option. You cannot specify both source IDs and the value To find the source ID, use the listCloneArchive command. |
Optional |
-targetLocation |
-tl |
The absolute path of the target Middleware home or the target Oracle home. Ensure that the Middleware home or Oracle home directory does not exist at that location. If it does exist, the command returns an error message. To specify multiple Oracle homes, use a comma-delimited list, with no spaces between the locations. For example: -targetLocation MW_HOME/oh1, MW_HOME/oh2 If you are cloning multiple Oracle homes, the number of Oracle homes specified must be the same as the number of source IDs specified in the sourceID option. |
Mandatory |
Table 17-3 describes the options for the listCloneArchive command.
Table 17-3 Options for the listCloneArchive Command
Options | Shortcut | Description | Mandatory or Optional |
---|---|---|---|
-archiveLocation |
-al |
The absolute path of the archive location. Use this option to specify the location of the archive file created by the createClone command. |
Mandatory |
-logDirLoc |
-ldl |
The location of an existing directory. A new log file is created in the directory. The default is the system Temp location. |
Optional |
Table 17-4 describes the options for the createClone command for components.
Table 17-4 Options for the createClone Command for Components
Options | Shortcut | Description | Mandatory or Optional |
---|---|---|---|
-archiveLocation |
-al |
The absolute path of the archive location. Use this option to specify the location of the archive file created by the createClone command. |
Mandatory |
-logDirLoc |
-ldl |
The location of an existing directory. A new log file is created in the directory. The default is the system Temp location. |
Optional |
-silent |
NA |
Specifies whether or not the clone operation operates silently. That is, it does not prompt for confirmation. The default is that the operation prompts for confirmation. To specify that it not prompt for confirmation, specify this option with the value of |
Optional |
-sourceComponentName |
-scn |
The name of the component to be cloned. For example, if your Oracle Internet Directory component is named oid1, specify oid1. |
Mandatory |
-sourceInstanceHomeLoc |
-sih |
The absolute path of the Oracle instance for the source. You use this when you clone components that are part of an Oracle instance. |
Mandatory |
Table 17-5 describes the options for the applyClone command for components.
Table 17-5 Options for the applyClone Command for Components
Options | Shortcut | Description | Mandatory or Optional |
---|---|---|---|
-archiveLocation |
-al |
The absolute path of the archive location. Use this option to specify the location of the archive file created by the createClone command. The archive will be restored either fully or partially, depending on the sourceID values specified. |
Mandatory |
-sourceID |
-so |
The source ID, a unique identifier for each entity in the archive, of the entity to restore. The default is You can restore one component at a time, so you can specify only one sourceID. To find the source ID, use the listCloneArchive command. |
Optional |
-targetComponentName |
-tcn |
The name of the component to be cloned. |
Mandatory |
-targetInstanceName |
-tin |
The name of the target Oracle instance. The name must be unique in the domain. |
Optional, if the targetInstanceHomeLoc directory exists. In this case, the operation retrieves the name from the configuration. |
-targetInstanceHomeLoc |
-tih |
The absolute path of the target Oracle instance. If the Oracle instance directory does not exist at that location, the command creates the directory. The same type of component should not already exist in the Oracle instance. |
Mandatory |
-targetOracleHomeLoc |
-toh |
The absolute path of the target Oracle home. The target Oracle home must exist and it must be an Identity Management Oracle home. That is, it must contain the binaries for Oracle Internet Directory or Oracle Virtual Directory. |
Optional, if the targetInstanceHomeLoc exists. In this case, the operation retrieves the targetOracleHomeLoc from the configuration. |
-silent |
NA |
Specifies whether or not the clone operation operates silently. That is, it does not prompt for confirmation. The default is that the operation prompts for confirmation. To specify that it not prompt for confirmation, specify this option with the value of |
Optional |
Domain-Specific Options |
|||
-targetMWHomeLoc |
-tmw |
The absolute path of the target Middleware home. If you provide this option, the Middleware home must be the parent of the targetOracleHomeLoc. |
Optional, if the component is registered with the domain. |
-domainHostName |
-domainhost |
The name of the host on which the domain is configured. Use this option if you want to register the component with the domain. |
Optional, if you do not want to register the component with the domain. |
-domainPortNo |
-domainport |
The port number of the domain. Use this option if you want to register the component with the domain. The domain port number is listed in the following file as the adminPort.
ORACLE_INSTANCE/config/OPMN/opmn/instance.properties
For example: adminPort=7001 |
Optional, if you do not want to register the component with the domain. |
-domainAdminUserName |
-domainuser |
The name of the administrative user for the domain. Use this option if you want to register the component with the domain. |
Optional, if you do not want to register the component with the domain. |
-domainAdminPassword |
-domainpass |
The password for the administrative user for the domain. Use this option if you want to register the component with the domain. |
Optional, if you do not want to register the component with the domain. |
Oracle Internet Directory Options |
|||
-dbHostName |
-dbhost |
The host name on which the database is running, which can be found in the tnsnames.ora file. |
Mandatory |
-dbPortNo |
-dbport |
The port number of the database listener, which can be found in the tnsnames.ora file. |
Mandatory |
-dbServiceName |
-dbservice |
The service name for the database, which can be found in the tnsnames.ora file. |
Mandatory |
-namespace |
-namespace |
The namespace mapping to a distinguished name (DN). For example: dc=us,dc=oracle,dc=com |
Mandatory |
-odsSchemaPassword |
-odspass |
The password for the ODS schema, which is the schema that contains metadata for Oracle Internet Directory. If it is not provided, the operation prompts for a password. |
Optional |
-odssmSchemaPassword |
-odssmpass |
The password for the schema odssm, which is used to access server manageability information for Oracle Internet Directory from the database. If it is not provided, the operation prompts for a password. |
Optional |
-oidAdminPassword |
-oidadminpass |
The password for the Oracle Internet Directory administrator. If it is not provided, the operation prompts for a password. |
Optional |
-oidNonSSLPort |
-oidport |
The non-SSL port for Oracle Internet Directory. If you do not provide a port number or if the port number you provide is not available, the applyClone operation uses an available port. |
Optional |
-oidSSLPort |
-oidsport |
The SSL port for Oracle Internet Directory. If you do not provide a port number or if the port number you provide is not available, the applyClone operation uses an available port. |
Optional |
Oracle Virtual Directory Options |
|||
-namespace |
-namespace |
The namespace mapping to a distinguished name (DN). For example: dc=us,dc=oracle,dc=com |
Mandatory |
-ovdAdmin |
-ovdadmin |
The administrator name for Oracle Virtual Directory. For example, cn=orcladmin. |
Mandatory |
-ovdAdminPassword |
-ovdadminpass |
The password for the administrator for Oracle Virtual Directory. |
Mandatory |
-isOvdAdminSSLEnable |
-isovdadminssl |
Specifies whether or not the Oracle Virtual Directory administration is enabled for SSL. Valid values are |
Optional |
-isOvdHttpSSLEnable |
-isovdhttpssl |
Use this parameter only if you need the HTTP/DSML gateway port for Oracle Virtual Directory. Valid values are |
Optional |
-ovdAdminPort |
-ovdadminport |
The administration port number for Oracle Virtual Directory. If you do not provide a port number or if the port number you provide is not available, the applyClone operation uses an available port. |
Optional |
-ovdHttpPort |
-ovdhttport |
The HTTP listener port number for Oracle Virtual Directory. Use this option only if you specify the -isOvdHttpSSLEnable option. |
Optional |
-ovdLdapPort |
-ovdldapport |
The LDAP non-SSL port number for Oracle Virtual Directory. If you do not provide a port number or if the port number you provide is not available, the applyClone operation uses an available port. |
Optional |
-ovdLdapSPort |
-ovdldapsport |
The LDAP SSL port number for Oracle Virtual Directory. If you do not provide a port number or if the port number you provide is not available, the applyClone operation uses an available port. |
Optional |
The general steps for cloning, whether you are cloning Middleware home, an Oracle home, or a component, are similar. The general steps are described in Section 17.3.
The following sections describe how you clone these entities:
You can clone a Middleware home, which can contain one or more Oracle homes and an Oracle WebLogic Server home.
Note:
|
You can clone only a Middleware home, excluding its Oracle homes.
To clone only the Middleware home and none of its Oracle homes:
At the source Middleware home, execute the createClone command, using the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone -archiveLocation archive_location -sourceMWHomeLoc MW_HOME -excludeOracleHomes true
For example, to create an archive of a Middleware home that is located at /scratch/oracle /Middleware1 and to exclude Oracle homes, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone
-archiveLocation /tmp/mw_clone.jar
-sourceMWHomeLoc /scratch/Oracle/Middleware1
-excludeOracleHomes true
If you are cloning the Middleware home to a different host, copy the files to that system. Copy the archive, as well as the cloningclient.jar file.
At the target, extract the files from the archive using the applyClone command. Specify the value all
for the sourceID option. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation archive_location -targetLocation target_MW_home -sourceID all
For example, to apply the clone to the directory /scratch/oracle/MW_Home_clone, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone
-archiveLocation /tmp/mw_clone.jar
-targetLocation /scratch/oracle/MW_Home_clone -sourceID all
To clone a Middleware home and all of its Oracle homes, but excluding the log files and files with the suffix .bak:
At the source Middleware home, execute the createClone command, using the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone -archiveLocation archive_location -sourceMWHomeLoc MW_HOME -excludePattern "pattern" [-invPtrLoc Oracle_Inventory_location]
For example, to clone a Middleware home that is located at /scratch/oracle /Middleware1 and to exclude log files, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone
-archiveLocation /tmp/mw_clone.jar
-sourceMWHomeLoc /scratch/Oracle/Middleware1 -excludePattern "*.log,*.bak"
-invPtrLoc /scratch/oracle/oraInst.loc
If you are cloning the Middleware home to a different host, copy the files to that system. Copy the archive, as well as the cloningclient.jar file.
At the target, extract the files from the archive using the applyClone command. Specify the value all
for the sourceID option. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation archive_location -targetLocation target_MW_home -sourceID all
For example, to apply the clone to the directory /scratch/oracle/MW_Home_clone, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone
-archiveLocation /tmp/mw_clone.jar
-targetLocation /scratch/oracle/MW_Home_clone -sourceID all
The Middleware home is restored at /scratch/oracle/MW_Home_clone and all of the Oracle homes are restored under it with the same name as that of source Oracle home name.
You can clone a Middleware home and some of its Oracle homes, excluding other Oracle homes.
For example, if you have a Middleware home that has three Oracle homes. You want to clone only two of those Oracle home, OH1 and OH2. You do not want to clone OH3. Take the following steps:
At the source Middleware home, execute the createClone command, using the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone -archiveLocation archive_location -sourceMWHomeLoc MW_HOME -sourceOracleHomeLoc ORACLE_HOME1,ORACLE_HOME2
For example, to create an archive of a Middleware home that is located at /scratch/oracle /Middleware1 and to clone only two of the three Oracle homes, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone
-archiveLocation /tmp/mw_clone.jar
-sourceMWHomeLoc /scratch/Oracle/Middleware1
-sourceOracleHomeLoc /scratch/Oracle/Middleware1/OH1,/scratch/Oracle/Middleware1/OH2
If you are cloning the Middleware home to a different host, copy the files to that system. Copy the archive, as well as the cloningclient.jar file.
At the target, extract the files from the archive using the applyClone command. Specify the value all
for the sourceID option. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation archive_location -targetLocation target_MW_home -sourceID all
For example, to apply the clone to the directory /scratch/oracle/MW_Home_clone, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone
-archiveLocation /tmp/mw_clone.jar
-targetLocation /scratch/oracle/MW_Home_clone -sourceID all
When you clone an Oracle home, you copy the contents of the Oracle home. This is useful when you want a copy of an Oracle home to which patches have been applied. You can clone multiple Oracle homes at the same time.
Note the following:
If you are cloning an Oracle home to another host, you must copy the cloningclient.jar file from the source to the target host. The Java JDK, version 1.6.4 or later, must be available on that host.
The directory that you specify for the cloned Oracle home must not exist.
You can apply the clone to the same Middleware home or a different Middleware home.
If the Oracle home contains Oracle SOA Suite, Oracle WebCenter, Oracle Forms Services, Oracle Reports, or Oracle Business Intelligence Discoverer, the parent of the Oracle home must be the Middleware home.
If you are applying the clone of an Oracle SOA Suite or Oracle WebCenter Oracle home, ensure that the same type of Oracle home is not present in that Middleware home. That is, you can have only one Oracle SOA Suite Oracle home in a Middleware home and you can have only one Oracle WebCenter Oracle home in a Middleware home.
If you are applying the clone of an Identity Management or Web Tier Oracle home, you can restore it to a directory that is not a Middleware home by using the -mwHomeValidation option with a value of false.
To clone two Oracle homes, soa_oh1, and idm_oh1:
At the source Oracle home, execute the createClone command, using the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone -archiveLocation archive_location -sourceOracleHomeLoc ORACLE_HOME1,ORACLE_HOME2 [-invPtrLoc Oracle_Inventory_location]
For example, to clone two Oracle homes, soa_oh1, and idm_oh1, located at /scratch/Oracle/Middleware1, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone
-archiveLocation /tmp/oh_clone.jar
-sourceOracleHomeLoc /scratch/Oracle/Middleware1/soa_oh1,/scratch/Oracle/Middleware1/idm_oh1
-invPtrLoc /scratch/oracle/oraInst.loc
To specify that the operation does not validate that the parent of an Oracle home is a Middleware home, use the mwHomeValidation option with the value of false
.
Use the listCloneArchive command to list the sourceIDs of the Oracle homes to be cloned. Note that this lists all sourceIDs in the archive. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive -archiveLocation archive_location
For example:
java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive
-archiveLocation /tmp/oh_clone.jar
Log File : "/tmp/CLONE2009-04-07_10-36-38AM-LOG/CLONE2009-04-07_10-36-38AM.log" .
Error File : "/tmp/CLONE2009-04-07_10-36-38AM-LOG/CLONE2009-04-07_10-36-38AM.error" .
2009-04-07_10-36-38AM : INFO : CLONE-21039 Gathering all sourceid from archive.
Oracle home archive # 1 , sourceid =oraclehome1@soa_oh1,
home location =/scratch/Oracle/Middleware/soa_oh1
Oracle home archive # 2 , sourceid =oraclehome1@idm_oh1,
home location =/scratch/Oracle/Middleware/idm_oh1
If you are cloning the Oracle home to a different host, copy the files to that system. Copy the archive, as well as the cloningclient.jar file.
At the target, extract the files from the archive using the applyClone command. Specify the value of the sourceIDs for each Oracle home. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone
-archiveLocation archive_location
-targetLocation target_ORACLE_HOME1,target_ORACLE_HOME1,
-sourceID OH1_sourceID,OH2_sourceID
For example, to apply the clone to the directories/scratch/Oracle/Middleware1/soa_oh1_cl and /scratch/Oracle/Middleware1/soa_oh2_cl, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone
-archiveLocation /tmp/oh_clone.jar
-targetLocation /scratch/Oracle/Middleware1/soa_oh1_cl,/scratch/Oracle/Middleware1/soa_oh2_cl
-sourceID oraclehome1@soa_oh1,oraclehome2@idm_oh1
You can clone Oracle Internet Directory to the same host or a different host, the same Middleware home or a different Middleware home, or a different Oracle instance. You cannot clone it to the same Oracle instance.
You must apply the clone to an Oracle home that contains the binaries for Identity Management.
To clone Oracle Internet Directory:
At the source Middleware home, execute the createClone command, using the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone -archiveLocation archive_location -sourceInstanceHomeLoc ORACLE_INSTANCE -sourceComponentName component_name
For example, to clone Oracle Internet Directory instance named oid1 in the Oracle instance located in /scratch/Oracle/Middleware/im_1, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone
-archiveLocation /tmp/oid1.jar
-sourceInstanceHomeLoc /scratch/Oracle/Middleware1/im_1
-sourceComponentName oid1
Use the listCloneArchive command to list the sourceIDs of the Oracle Internet Directory component to be cloned. Note that this command lists all sourceIDs in the archive. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive -archiveLocation archive_location
For example:
java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive
-archiveLocation /tmp/oid1.jar
If you are cloning Oracle Internet Directory to a different host, copy the files to that system. Copy the archive, as well as the cloningclient.jar file.
At the target, extract the files from the archive using the applyClone command. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation archive_location [-sourceId source_id] [-targetMWHomeLoctrgt_location] -targetOracleHomeLoc trgt_ORACLE_HOME_path [-targetInstanceHomeLoc trgt_ORACLE_INSTANCE_path ] [-targetInstanceName trgt_ORACLE_INSTANCE_name] -targetComponentName trgt_component_name [-domainHostName domain_host_name] [-domainPortNo domain_port_number] [-domainAdminUserName domain_admin_username] [-domainAdminPassword domain_admin_password] -dbHostName database_host_name -dbPortNo database_port_number -dbServiceName databaseServiceName -odsSchemaPassword ods_schema_password -odssmSchemaPassword odssmSchema_password -namespace namespace -oidAdminPassword oid_admin_password [-oidNonSSLPort oid_port ] [-oidSSLPort oid_ssl_port ]
For example, to apply the clone to the Oracle instance im_2 and name the cloned Oracle Internet Directory instance oid_cl, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation /tmp/oid1.jar -sourceId im_1@oid1 -targetMWHomeLoc /scratch/Oracle/Middleware -targetOracleHomeLoc /scratch/Oracle/Middleware/Oracle_IM2 -targetInstanceHomeLoc /scratch/Oracle/Middleware/im_2 -targetInstanceName im_1 -targetComponentName oid_cl -domainHostName myhost -domainPortNo 7001 -domainAdminUserName domain_admin_username -domainAdminPassword domain_admin_password -dbHostName database_host_name -dbPortNo 1521 -dbServiceName orcl -odsSchemaPassword ods_schema_password -odssmSchemaPassword odssmSchema_password -namespace namespace -oidAdminPassword oid_admin_password
You can clone Oracle Virtual Directory to the same host or a different host, the same Middleware home or a different Middleware home, or a different Oracle instance. You cannot clone it to the same Oracle instance.
You must apply the clone to an Oracle home that contains the binaries for Identity Management.
To clone Oracle Virtual Directory:
At the source Middleware home, execute the createClone command, using the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone -archiveLocation archive_location -sourceInstanceHomeLoc ORACLE_INSTANCE -sourceComponentName component_name
For example, to clone Oracle Virtual Directory instance named ovd1 in the Oracle instance located in /scratch/Oracle/Middleware/im_1, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar createClone
-archiveLocation /tmp/ovd1.jar
-sourceInstanceHomeLoc /scratch/Oracle/Middleware1/im_1
-sourceComponentName ovd1
Use the listCloneArchive command to list the sourceIDs of the Oracle Virtual Directory component to be cloned. Note that this lists all sourceIDs in the archive. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive -archiveLocation archive_location
For example:
java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive
-archiveLocation /tmp/ovd1.jar
If you are cloning Oracle Virtual Directory to a different host, copy the files to that system. Copy the archive, as well as the cloningclient.jar file.
At the target, extract the files from the archive using the applyClone command. Use the following syntax:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation archive_location [-sourceId source_id] [-targetMWHomeLoctrgt_location] [-targetOracleHomeLoc trgt_ORACLE_HOME_path] -targetInstanceHomeLoc trgt_ORACLE_INSTANCE_path [-targetInstanceName trgt_ORACLE_INSTANCE_name] -targetComponentName trgt_component_name [-domainHostName myhost ] [-domainPortNo 7001 ] [-domainAdminUserName domain_admin_username] [-domainAdminPassword domain_admin_password] -namespace namespace -isOvdAdminSSLEnable true_or_false -ovdAdmin ovd_admin_name -ovdAdminPassword ovd_admin_password [-isOvdHttpSSLEnable true_or_false ] [-ovdHttpPort ovd_http_port ] [-ovdLdapPort ovd_ldap_port ] [-ovdLdapSPort ovd_ldap_ssl_port ]
For example, to apply the clone to the Oracle instance im_2 and name the cloned Oracle Virtual Directory instance ovd_cl, use the following command:
java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone -archiveLocation /tmp/ovd1.jar -sourceId im_1@oid1 -targetMWHomeLoc /scratch/Oracle/Middleware] -targetOracleHomeLoc /scratch/Oracle/Middleware/Oracle_IM2 -targetInstanceHomeLoc /scratch/Oracle/Middleware/im_2 -targetInstanceName im_2 -targetComponentName ovd_cl -domainHostName myhost -domainPortNo 7001 -domainAdminUserName domain_admin_username -domainAdminPassword domain_admin_password -namespace namespace -isOvdAdminSSLEnable true -ovdAdmin ovd_admin_name -ovdAdminPassword ovd_admin_password
Note the following important additional considerations about cloning:
Cloning does not carry over all the dependencies of the source Oracle home, such as loadable modules or application-specific libraries to the cloned home, because cloning proceeds by copying the entire source Oracle home to the destination Oracle home. Any files outside the source Oracle home are not automatically copied. Hence, any applications that refer to files outside the source Oracle home may not work properly in the cloned home.
If you created symbolic links to files or applications outside the source Oracle home, you must re-create the link manually in the cloned home for your applications to work properly.
When you clone a Middleware home, only the read-only portions of the Middleware home are cloned. Any user configuration files, such a the user_projects directory, are excluded from the cloned image. The WebLogic Server domain is not cloned.
If a cloning operation fails, but it results in the Oracle home being registered with Oracle Inventory, you cannot use the same Oracle home in subsequent cloning operations. Either use another directory and name for the Oracle home in subsequent cloning operations or deinstall the Oracle home before attempting another cloning operation.
If you are applying the clone of a Middleware home or an Oracle home on a host that does not yet have Oracle Fusion Middleware installed, the host must have JDK 1.6 or higher installed. In addition, the PATH, CLASSPATH, and JAVA_HOME environment variables must point to the JDK.