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 Understanding Cloning a Middleware Home

When you clone a Middleware home, you create an archive of the source Middleware home and use the archive to create the cloned Middleware home:

  • At the source, you run the copyBinary script, specifying the Middleware home that you want to clone. The script 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.

    The archive contains all of the Oracle homes and Oracle WebLogic Server homes in the Middleware home.

  • At the destination, you run the pasteBinary script, specifying destination for the Middleware home. The script 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.3.2 Understanding Cloning Components

You can clone Oracle Virtual Directory and Oracle Internet Directory.

You create an archive of the source component's configuration and use the archive to create the cloned component:

  • At the source, you run the copyConfig script, specifying the source component that you want to clone. The script prepares the source for cloning and creates an archive that contains the component configuration.

  • At the destination, you run the pasteConfig script, specifying the destination for the component. The script checks to see that the prerequisites are met at the destination. It extracts the files from the archive file. Then, it restores the file permissions.

19.4 Cloning Syntax

You use the following scripts to clone a Middleware home or component:

  • Copy the source Middleware home:

    (UNIX) ORACLE_COMMON_HOME/bin/copyBinary.sh
    (Windows) ORACLE_COMMON_HOME\bin\copyBinary.cmd
    
  • Apply the copied Middleware home to the target:

    (UNIX) ORACLE_COMMON_HOME/bin/pasteBinary.sh
    (Windows) ORACLE_COMMON_HOME\bin\pasteBinary.cmd
    
  • Copy the source component configuration:

    (UNIX) ORACLE_COMMON_HOME/bin/copyConfig.sh
    (Windows) ORACLE_COMMON_HOME\bin\copyConfig.cmd
    
  • Apply the copied component configuration to the target:

    (UNIX) ORACLE_COMMON_HOME/bin/pasteConfig.sh
    (Windows) ORACLE_COMMON_HOME\bin\pasteConfig.cmd
    

To specify additional Java options, define the T2P_JAVA_OPTIONS environment variable and specify the options in the variable definition. The following examples set the value for the Java temp directory:

  • On Linux or UNIX:

    setenv T2P_JAVA_OPTIONS "-Djava.io.tmpdir=/home/sasinsin/temp"
    export T2P_JAVA_OPTIONS
     
    
  • On Windows:

    set T2P_JAVA_OPTIONS="-Djava.io.tmpdir=c:\home\sasinsin\temp"
    

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.04 or higher installed. In addition, ensure that the PATH, CLASSPATH, and JAVA_HOME environment variables point to the JDK.

Copy the scripts from the following location in the source host to the target host. You can copy them to any directory.

(UNIX) ORACLE_COMMON_HOME/bin/pasteBinary.sh
(Windows) ORACLE_COMMON_HOME\bin\pasteBinary.cmd

Copy the following file from the following location in the source host to the target host:

(UNIX) ORACLE_HOME/jlib/cloningclient.jar
(Windows) ORACLE_HOME\jlib\cloningclient.jar

Ensure that the files have execute permission.

Cloning Scripts

This section describes the syntax of the cloning scripts. The options are described in the tables that follow the syntax.

Note that all cloning scripts 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 script to return an error. Also note that, in silent mode, the scripts generate 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.

copyBinary Script

Creates an archive file of the source Middleware home, by copying the binary files of of that Middleware home, including all of its Oracle homes and its WebLogic Server home, into the archive file.

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

The following example shows how to create an archive of a Middleware home on Linux:

copyBinary.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/ 
              -archiveLocation /tmp/mw_clone.jar
              -sourceMWHomeLoc /scratch/Oracle/Middleware1 
              -invPtrLoc /scratch/oracle/oraInst.loc

Table 19-1 describes the options for the copyBinary script.

Table 19-1 Options for the copyBinary Script

Options Shortcut Description Mandatory or Optional

-javaHome

NA

The absolute path of the Java Developer's Kit.

Use the -d64 option to the java command if the operating system is SunOS, HP-UX, or Linux 64 bit. You can use this option in the command line or in the T2P_JAVA_OPTIONS environment variable.

Mandatory

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

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

Ensure that the archive location is not within the Middleware home structure.

Mandatory

-invPtrLoc

-invLoc

The absolute path to the Oracle Inventory pointer. Use this option if the inventory location is not in the default location, so that the operation can read the Oracle homes present in the inventory.

You must have write permission to the inventory location.

(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 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 to be archived. You can only specify one Middleware home.

Mandatory.


pasteBinary Script

Applies the clone to the target destination, by pasting the binary files of the source Middleware home. You can apply the clone to the same host or a different host.

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

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

pasteBinary.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/
               -archiveLocation  /tmp/mw_clone.jar 
               -targetLocation /scratch/oracle/MW_Home_clone 

Table 19-2 describes the options for the pasteBinary script.

Table 19-2 Options for the pasteBinary Script

Options Shortcut Description Mandatory or Optional

-javaHome

NA

The absolute path of the Java Developer's Kit.

Use the -d64 option to the java command if the operating system is SunOS, HP-UX, or Linux 64 bit. You can use this option in the command line or in the T2P_JAVA_OPTIONS environment variable.

If the source Middleware home was installed with the JDK and Oracle JRockit outside of the Middleware home, the path you specify is used to configure the Middleware home.

Mandatory

-archiveLocation

-al

The absolute path of the archive location. Use this option to specify the location of the archive file created with the copyBinary script.

The location must exist.

Ensure that the archive location is not within the Middleware home structure.

Mandatory

-executeSysPrereqs

-exsysprereqs

Specifies whether the pasteBinary 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. Use this option if the inventory location is not in the default location, so that the operation can read the Oracle homes present in the inventory.

You must have write permission to the inventory location.

(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

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

The targetLocation can not be inside another Middleware home.

Mandatory


copyConfig Script

Creates an archive file of the source component instance, by copying the configuration files of that component instance into the archive file.

copyConfig  -archiveLocation archive_location 
            -sourceInstanceHomeLoc src_instance_path
            -sourceComponentName src_component_name
            [-logDirLoc log_dir_path]
            [-silent {true | false}]

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

copyConfig.sh  -archiveLocation /tmp/ovd1.jar
               -sourceInstanceHomeLoc /scratch/Oracle/Middleware1/im_1
               -sourceComponentName ovd1

Table 19-3 describes the options for the copyConfig script.

Table 19-3 Options for the copyConfig Script

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 by the copyConfig script.

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


pasteConfig Script

Applies the clone to the target destination, by pasting the configuration files of the source component into the specified Oracle instance.

pasteConfig  -archiveLocation archive_location
             -targetComponentName trgt_component_name 
             -targetInstanceHomeLoc trgt_Instance_path 
             [-targetInstanceName trgt_Instance_name] 
             [-targetOracleHomeLoc trgt_ORACLE_HOME_path] 
             [-silent {true | false}]
             [-logDirLoc log_dir_path]
             [ <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 ]

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

pasteConfig -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-4 describes the options for the pasteConfig script.

Table 19-4 Options for the pasteConfig Script

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

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 value from the configuration.

-silent

NA

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

  • If the target host does not contain the file oraInst.loc, you must create the file (you must have Super User or root privileges). By default, the clone operation looks for the file in the /etc directory. If you create it in another location, use the -invPtr parameter to the pasteBinary command to specify the location.

    The file must contain the following:

    inventory_loc=oraInventory_location
    inst_group=user_group
    

To clone a Middleware home:

  1. On Windows, at the source Middleware home, stop the Administration Server and any Managed Servers running in the Middleware home.

  2. At the source Middleware home, execute the copyBinary script, which 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. Use the following syntax:

    copyBinary -javaHome path_of_jdk
               -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:

    copyBinary.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/
                  -archiveLocation /tmp/mw_clone.jar
                  -sourceMWHomeLoc /scratch/Oracle/Middleware1 
                  -invPtrLoc /scratch/oracle/oraInst.loc
    
  3. If you are cloning the Middleware home to a different host, copy the archive file to that system.

    In addition, if the target system does not contain the scripts, copy the pasteBinary scripts and the cloningclient.jar file to the target system and ensure that they have execute permission. See Section 19.4 for the locations of the files.

    Do not copy the other scripts, such as pasteConfig. Those scripts are generated when you extract the files, as in step 4.

  4. At the target, extract the files from the archive using the pasteBinary script. Use the following syntax:

    pasteBinary -javaHome path_of_jdk
                -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:

    pasteBinary.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/ 
                   -archiveLocation  /tmp/mw_clone.jar 
                   -targetLocation /scratch/oracle/MW_Home_clone 
    

    The Middleware home is extracted to /scratch/oracle/MW_Home_clone and the WebLogic Server home and all of the Oracle homes are extracted under it with the same names as that of the source Oracle home names.

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 copyConfig command, using the following syntax:

    copyConfig -javaHome path_of_jdk
               -archiveLocation  archive_location 
               -sourceInstanceHomeLoc ORACLE_INSTANCE 
               -sourceComponentName component_name
    

    For example, to clone the Oracle Internet Directory instance named oid1 in the Oracle instance located in /scratch/Oracle/Middleware1/im_1, use the following command:

    copyConfig.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/ 
                  -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 archive file to that system.

  3. At the target, extract the files from the archive using the pasteConfig script. Use the following syntax:

    pasteConfig -javaHome path_of_jdk
                -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:

    pasteConfig.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/
                -archiveLocation /tmp/oid1.jar
                -targetOracleHomeLoc /scratch/Oracle/Middleware/Oracle_IM2 
                -targetInstanceHomeLoc /scratch/Oracle/Middleware/im_2 
                -targetInstanceName im_2 
                -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 copyConfig command, using the following syntax:

    copyConfig -javaHome path_of_jdk 
               -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:

    copyConfig.sh -javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/ 
                  -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 archive file to that system.

  3. At the target, extract the files from the archive using the pasteConfig command. Use the following syntax:

    pasteConfig -javaHome path_of_jdk
                -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:

    pasteConfig javaHome /scratch/Oracle/Middleware/jrockit_160_14_R27.6.5-32/
                -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.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.

  • The cloning operation does not clone the Coherence folder, which is a subdirectory of the Middleware home. For example, it does not clone the following directory:

    MW_HOME/coherence_3.5
    
  • 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.04 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.

  • If there is not enough space in the temporary directory when you are cloning an entity, an error is returned. To work around this problem, specify a different location for the temporary directory by using the T2P_JAVA_OPTIONS environment variable as described in Section 19.4.

19.7 Deprecated Cloning Commands and Syntax

The commands and syntax in this section are deprecated. They will be considered obsolete in the next version.

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 PA-Risc, 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.04 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.

Deprecated Cloning Commands

This section describes the deprecated 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-5 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-8 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-7 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-6 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-9 for a description of the options for applying the clone of a component.

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-5 describes the options for using the createClone command for a Middleware home.

Table 19-5 Options for the Deprecated 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-6 describes the options for using the applyClone command for a Middleware home.

Table 19-6 Options for the Deprecated 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.

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-7 describes the options for the listCloneArchive command.

Table 19-7 Options for the Deprecated 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-8 describes the options for the createClone command for components.

Table 19-8 Options for the Deprecated 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-9 describes the options for the applyClone command for components.

Table 19-9 Options for the Deprecated 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 value 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 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 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 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 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