19 Cloning Oracle Fusion Middleware

You can clone a Middleware home and certain Oracle Fusion Middleware components, such as Oracle Internet Directory and Oracle Virtual Directory.

This chapter includes the following topics:

19.1 Introduction to Cloning

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 that is a copy of a production, test, or development environment. Cloning enables you to create a new Middleware home with all patches applied to all of the Oracle homes and the WebLogic Server home in a single step. This is in contrast to separately installing and applying any patches to the WebLogic Server home and separate Oracle homes.

  • Preparing a "gold" image of a patched Middleware home and deploying it to many hosts.

The cloned entity behaves the same as the source entity. For example, a cloned Middleware home can be deinstalled or patched using the installer. It can also be used as the source for another cloning operation.

19.2 What You Can Clone

You can clone the following, on the same host or a different host:

  • Middleware home: You can clone the Middleware home and all of the Oracle homes within the Middleware home. You can clone a Middleware home that contains no Oracle homes.

    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 Internet Directory: You can clone Oracle Internet Directory to the same or a different Oracle instance, to the same or a different Middleware home, on the same host or a different host.

  • Oracle Virtual Directory: You can clone Oracle Virtual Directory to the same or a different Oracle instance, to the same or a different Middleware home, on the same host or a different host.

See Section 19.6 for details of considerations and limitations affecting specific components.

19.3 Understanding the Cloning Process

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:

19.3.1 Source Preparation Phase

At the source, you run the createClone command, specifying the Middleware 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 and the Oracle homes within the Middleware home.

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 Oracle Virtual Directory or Oracle Internet Directory, the archive contains the component configuration.

19.3.2 Cloning Phase

At the destination, you run a clone command, specifying either the Middleware home or component 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.

19.4 Cloning Syntax

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 SunOS, HP-UX, HPIA64, HPUX-PARisc, or Linux-64 bit.

Note:

If you are applying the clone of a Middleware 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, ensure that the PATH, CLASSPATH, and JAVA_HOME environment variables point to the JDK.

Copy the cloningclient.jar file from the source host to the target host. You can copy it to any directory.

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, in silent mode, the command generates an error if you do not provide passwords where they are needed.

Also note that most options have shortcut names, as described in the tables later in this section.

createClone

Creates an archive file of a Middleware home or a component.

The syntax differs depending on what you are cloning.

The syntax for creating a clone of a Middleware home is:

createClone -archiveLocation archive_location 
            -sourceMWHomeLoc MW_HOME   
            [-invPtrLoc Oracle_InventoryLocation]
            [-logDirLoc log_dir_path]
            [-silent {true | false}]

See Table 19-1 for a description of the options for creating a clone of a Middleware home.

The following example shows how to create the clone of a Middleware home:

java -jar ORACLE_HOME/jlib/cloningclient.jar createClone 
       -archiveLocation /tmp/mw_clone.jar
       -sourceMWHomeLoc /scratch/Oracle/Middleware1 
       -invPtrLoc /scratch/oracle/oraInst.loc

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.

See Table 19-4 for a description of the options for creating a clone of a component.

The following example shows how to create the clone of the Oracle Virtual Directory instance named ovd1 in the Oracle instance located in /scratch/Oracle/Middleware/im_1:

java -jar ORACLE_HOME/jlib/cloningclient.jar createClone 
       -archiveLocation /tmp/ovd1.jar
       -sourceInstanceHomeLoc /scratch/Oracle/Middleware1/im_1
       -sourceComponentName ovd1
listCloneArchive

Lists the contents of the archive. The syntax is:

listCloneArchive -archiveLocation archive_location [-logDirLoc logdir_path]

See Table 19-3 for a description of the options.

The following example shows how to list the contents of the archive:

java -jar ORACLE_HOME/jlib/cloningclient.jar listCloneArchive 
               -archiveLocation  /tmp/oh_clone.jar
  Middleware home archive # 1 ,   home location =  /scratch/oracle/mwhome_cln0
  Oracle     home archive # 1 ,   home location =  /scratch/oracle/mwhome_cln0/oh_cln0
applyClone

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 Oracle Virtual Directory or Oracle Internet Directory, you can apply the clone to the same or a different Oracle instance, to the same or a different Middleware home (on the same host or a different host).

The syntax differs depending on what you are cloning.

The syntax for applying the clone of a Middleware home:

applyClone -archiveLocation archive_location
            -targetLocation target_location
            [-executeSysPrereqs {true | false}]
            [-invPtrLoc Oracle_InventoryLocation]
            [-logDirLoc log_dir_path]
            [-javaHome java_home_location]
            [-silent {true | false}]

See Table 19-2 for a description of the options for applying the clone of a Middleware home.

The following example shows how to apply the clone to the directory /scratch/oracle/MW_Home_clone:

java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone 
         -archiveLocation  /tmp/mw_clone.jar 
         -targetLocation /scratch/oracle/MW_Home_clone 

The syntax for applying the clone of a component, such as Oracle Internet Directory or Oracle Virtual Directory is:

applyClone -archiveLocation archive_location
          -targetComponentName trgt_component_name 
          -targetInstanceHomeLoc trgt_Instance_path 
          [-targetInstanceName trgt_Instance_name] 
          [-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_file 

<Oracle Internet Directory Detail> =
         -namespace oid_namespace
         -dbHostName database_host_name 
         -dbPortNo database_port_number 
         -dbServiceName databaseServiceName 
         -odsSchemaPassword ods_schema_password_file 
         -odssmSchemaPassword odssm_Schema_password_file 
         -oidAdminPassword oid_admin_password_file
         [-oidNonSSLPort oid_port ]
         [-oidSSLPort oid_ssl_port ]

<Oracle Virtual Directory Detail> = 
         [-ovdAdminPort ovd_admin_port ]
         [-ovdHttpPort ovd_http_port ]
         [-ovdLdapPort ovd_ldap_port ]
         [-ovdLdapSPort ovd_ldap_ssl_port ]

See Table 19-5 for a description of the options for applying the clone of a Middleware home.

The following example shows how to apply the clone to the Oracle instance im_2 and name the cloned Oracle Virtual Directory instance ovd_cl:

java -jar ORACLE_HOME/jlib/cloningclient.jar applyClone 
            -archiveLocation /tmp/ovd1.jar
            -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_file 

Table 19-1 describes the options for using the createClone command for a Middleware home.

Table 19-1 Options for the createClone Command for a Middleware 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.

The archive location must not exist, but its parent directory must exist and have write permission.

Mandatory

-invPtrLoc

-invLoc

The absolute path to the Oracle Inventory pointer. Use this option when creating a clone of a Middleware 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.

(On Linux, the default location is /etc/oraInst.loc.)

Optional, if the inventory is in the default location. 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

-silent

NA

Specifies whether 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 true.

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.

Mandatory.


Table 19-2 describes the options for using the applyClone command for a Middleware home.

Table 19-2 Options for the applyClone Command for a Middleware 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 location must exist.

Mandatory

-executeSysPrereqs

-exsysprereqs

Specifies whether the applyClone operation checks the prerequisites of the Oracle homes. The default is that it checks the prerequisites. To specify that it does not check the prerequisites, specify this option with the value false.

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

-silent

NA

Specifies whether 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 true.

Optional

-targetLocation

-tl

The absolute path of the target Middleware home.

Ensure that the Middleware home directory does not exist at that location. If it does exist, the command returns an error message.

Mandatory


Table 19-3 describes the options for the listCloneArchive command.

Table 19-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.

The location must exist.

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 19-4 describes the options for the createClone command for components.

Table 19-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 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 true.

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 component.

Mandatory


Table 19-5 describes the options for the applyClone command for components.

Table 19-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.

Mandatory

-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 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 true.

Optional

Domain-Specific Options

     

-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 file 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 Oracle Internet Directory namespace. For example: dc=us,dc=oracle,dc=com

Mandatory

-odsSchemaPassword

-odspass

The password file 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 file for the ODSSM schema, 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 file 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

     

-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.

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


19.5 Cloning Oracle Fusion Middleware Entities

The general steps for cloning, whether you are cloning Middleware home or a component, are similar. The general steps are described in Section 19.3.

The following sections describe how you clone these entities and view information about a cloning archive:

19.5.1 Cloning a Middleware Home

You can clone a Middleware home, which can contain zero or more Oracle homes and an Oracle WebLogic Server home.

Note:

  • The cloning operation archives only those Oracle homes that lie within a Middleware home. It does not clone Oracle homes that are located outside of the Middleware home.

  • You can clone only one Middleware home at a time.

  • To create an archive of a Middleware home, Oracle WebLogic Server must be installed in the Middleware home.

  • On Windows, ensure that no Oracle WebLogic Server processes are running in the source Middleware home.

You can clone a Middleware home and all of its Oracle homes. The createClone operation finds the WebLogic Server home and the Oracle homes contained within the Middleware home. If there are no Oracle homes in the Middleware home, no Oracle homes will be present in the archive.

To clone a Middleware home:

  1. 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  
             [-invPtrLoc Oracle_Inventory_location]
    

    For example, to clone a Middleware home that is located at /scratch/Oracle /Middleware1, use the following command:

    java -jar ORACLE_HOME/jlib/cloningclient.jar createClone 
           -archiveLocation /tmp/mw_clone.jar
           -sourceMWHomeLoc /scratch/Oracle/Middleware1 
           -invPtrLoc /scratch/oracle/oraInst.loc
    
  2. 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.

  3. 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 
             -targetLocation target_MW_home 
    

    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 
    

    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.

19.5.2 Cloning Oracle Internet Directory

You can clone Oracle Internet Directory to the same or a different Oracle instance, to the same or a different Middleware home, on the same host or a different host.

You must apply the clone to an Oracle home that contains the binaries for Identity Management.

To clone Oracle Internet Directory:

  1. 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/Middleware1/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
    
  2. 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.

  3. 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 
                [-targetOracleHomeLoc trgt_ORACLE_HOME_path] 
                -targetInstanceHomeLoc trgt_ORACLE_INSTANCE_path 
                [-targetInstanceName trgt_ORACLE_INSTANCE_name] 
                -targetComponentName trgt_component_name 
                -namespace oid_namespace
                [-domainHostName domain_host_name]
                [-domainPortNo  domain_port_number] 
                [-domainAdminUserName domain_admin_username]
                [-domainAdminPassword domain_admin_password_file] 
                -dbHostName database_host_name 
                -dbPortNo database_port_number 
                -dbServiceName databaseServiceName 
                -odsSchemaPassword ods_schema_password_file 
                -odssmSchemaPassword odssm_Schema_password_file 
                -oidAdminPassword oid_admin_password_file
                [-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
                -targetOracleHomeLoc /scratch/Oracle/Middleware/Oracle_IM2 
                -targetInstanceHomeLoc /scratch/Oracle/Middleware/im_2 
                -targetInstanceName im_1 
                -targetComponentName oid_cl 
                -namespace dc=us,dc=oracle,dc=com 
                -domainHostName myhost
                -domainPortNo  7001 
                -domainAdminUserName domain_admin_username
                -domainAdminPassword domain_admin_password_file 
                -dbHostName database_host_name 
                -dbPortNo 1521 
                -dbServiceName orcl 
                -odsSchemaPassword ods_schema_password_file 
                -odssmSchemaPassword odssm_Schema_password_file 
                -oidAdminPassword oid_admin_password_file
    

Note that under certain conditions, you may see the following errors:

OID Cloning: Error cleaning replication agreements
OID Cloning: Error deleting replication dn
OID Cloning: Error updating orclreplicaid

If you do, take the following steps:

  1. Run the following command:

    ORACLE_HOME/ldap/bin/remtool -pcleanup
    

    When prompted, enter the OID host, non-SSL port, and the ODS schema password.

  2. Perform an ldapsearch on the root dn for the orclreplicaid value. Use the following command: '

    ORACLE_HOME/bin/ldapsearch -p port -h host 
       -b "" -s base "(objectclass=*)" orclreplicaid
    
  3. Using the value in obtained in Step 2, perform an ldapdelete, deleting the following dns from Oracle Internet Directory:

    cn=replication dn, orclreplicaid=<replicaid>, cn=replication configuration
    orclreplicaid=<replicaid>, cn=replication configuration
    

    For example:

    ldapdelete -p port -h host "cn=replication dn,
       orclreplicaid=replicaid, cn=replication configuration"
    
  4. Set the orclreplicaid value in the root entry to 0. For example:

    ORACLE_HOME/bin/ldapmodify -p port -h host -f file.ldif
    

    The ldif file will have the following contents:

    dn:
    changetype: modify
    replace: orclreplicaid
    orclreplicaid: 0
    
  5. Restart Oracle Internet Directory.

19.5.3 Cloning Oracle Virtual Directory

You can clone Oracle Virtual Directory to the same or a different Oracle instance, to the same or a different Middleware home, on the same host or a different host.

You must apply the clone to an Oracle home that contains the binaries for Identity Management.

To clone Oracle Virtual Directory:

  1. 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/Middleware1/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
    
  2. 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.

  3. 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 
                [-targetOracleHomeLoc trgt_ORACLE_HOME_path] 
                -targetInstanceHomeLoc trgt_ORACLE_INSTANCE_path 
                [-targetInstanceName trgt_ORACLE_INSTANCE_name] 
                -targetComponentName trgt_component_name 
                [-domainHostName hostname]
                [-domainPortNo  port] 
                [-domainAdminUserName domain_admin_username]
                [-domainAdminPassword domain_admin_password_file] 
                [-ovdAdminPort ovd_admin_port]
                [-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
                -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_file 
    

19.5.4 Listing the Contents of an Archive

Use the listCloneArchive command to list the contents of an archive created with the createClone command. 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
Middleware home archive # 1 ,   home location =  /scratch/oracle/mwhome_cln0  Oracle     home archive # 1 ,   home location =  /scratch/oracle/mwhome_cln0/oh_cln0

19.6 Considerations and Limitations for Cloning

Note the following important additional considerations about cloning:

  • Cloning does not carry over all the dependencies of the source Middleware home, WebLogic Server home, and Oracle homes, such as loadable modules or application-specific libraries to the cloned home, because cloning proceeds by copying the Middleware home and the entire source WebLogic Server home and Oracle homes to the destination Middleware home. Any files outside the source WebLogic Server or Oracle home are not automatically copied. Hence, any applications that refer to files outside the source WebLogic Server or Oracle home may not work properly in the cloned home.

    The Oracle home cloned as a part of the Middleware home clones only the binaries. The cloning of Oracle instances outside of Oracle homes is not supported.

  • If you created symbolic links to files or applications outside the source WebLogic Server or 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 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.

  • If an Oracle Internet Directory component is cloned with the same database credentials as the source component, the name of the cloned OID component should be different than the source component to avoid conflicts in the OID schema.

  • If an Oracle Internet Directory component is cloned with different database credentials from the source component, the name of the cloned Oracle Internet Directory component should be the same as the source component to avoid conflicts in the OID schema.