Move a WebLogic Server Instance

Use the clone script to clone and move a WebLogic server instance, where the script performs various procedural steps to clone your instance. You can also manually clone an instance by following the steps provided for a JRF or non-JRF instance.

For a non-JRF instance, you can clone to move the binaries and data, and then reuse the load balancer and IDCS of the original instance. For a JRF instance, you can clone and check if it is able to connect to the database through the data source, as no database-specific configuration updates are required.

Note:

For instances created after 22.3.2 (August 2022), if Application Performance Monitoring (APM) is not configured on the Original instance, but Application Performance Monitoring is configured on the Cloning instance, then the clone script adds Application Performance Monitoring to the cloned stack.

Clone a JRF or non-JRF Instance Using a Script

Learn how to clone an instance by using the clone script.

In this procedure,
  • Original instance, is the WebLogic Server instance you want to clone.
  • Cloning instance, is the WebLogic Server instance you will create to clone the Original instance.
Methods: There are two methods to clone an instance.
Method 1: Do not destroy the Original instance stack and run the script on the Cloning instance to clone the required volumes from the Original instance.
  1. Create a domain. This is the Cloning instance. See Create a Stack.

    Note:

    • You must create the Cloning instance using the same configuration as the Original instance, in the same compartment and region.
    • It is recommended to stop the original instance servers before running the cloning script. This is specifically recommended for JRF instances, as having 2 WebLogic domains using the same infrastructure schemas is not supported by Oracle WebLogic Server.
    • If your instance uses an existing VCN with a new subnet, then the CIDR range for the subnet created in the Cloning instance differs from the CIDR range of the subnet in the Original instance.
  2. In the Original instance, delete any load balancer using a reserved IP. See Remove the Load Balancer.
  3. In the Original instance, if you have assigned an SSL certificate to the original load balancer, then set up SSL certificates on the load balancer in the Cloning instance. See Add a Certificate to the Load Balancer.
  4. Stop all the servers in the Original instance. See Start and Stop a Domain.
  5. Log in to each node of the Cloning instance as an opc user.
  6. If you are using the CustomIdentityAndCustomTrust keystore for SSL configuration in the WebLogic Server domain, and you have not placed the keystore in a location under the data volume (/u01/data), then, as the oracle user, you will need to copy the keystore to the compute instance (VM) before you invoke the create_clone.py script in the next step.
  7. Run the create_clone.py script on each of the nodes. The create_clone.py script is located at /opt/scripts/cloning:
    • If you want to clone only the data block volumes:
      python3 create_clone.py -s <Original_instance_stack_OCID>
    • If you want to clone both the data block and Middleware volumes:
      python3 create_clone.py -s <Original_instance_stack_OCID> -m true

    Note:

    Do not run the script on Cloning instance nodes that correspond to nodes added on the Original instance with the Do Not Update Domain Configuration for Scale Out selected. The metadata for these nodes will be missing, resulting in failures at various steps in the script. On such nodes you must extend the domain in the same manner as you did on the Original instance.

    If the clone script fails at a particular stage, complete the steps in Clone Script Failed, and then return to this procedure to continue with the next step.

  8. Access the WebLogic console of the Cloning instance to verify the updates you performed to the instance. See Access the WebLogic Console.
  9. Destroy and Delete the Original instance. See Delete a Stack.

Method 2: Manually create cloned volumes, destroy the Original instance stack, and run the script on the Cloning instance to attach the cloned volumes.

Note:

This method is recommended when you are using VCN peering or running low on limits, such as, compute or load balancer.
  1. Clone the data block volumes of the Original instance. See Cloning a Volume.

    As required, you can also clone the Middleware volumes.

  2. Destroy and then delete the stack in Original instance. See Destroy Stack Resources and Delete the Stack.
  3. Create a domain. This is the Cloning instance. See Create a Stack.

    Note:

    You must create the Cloning instance using the same configuration as the Original instance, in the same compartment and region.
  4. Log in to each node of the Cloning instance as an opc user.
  5. If you are using the CustomIdentityAndCustomTrust keystore for SSL configuration in the WebLogic Server domain, and you have not placed the keystore in a location under the data volume (/u01/data), then, as the oracle user, you will need to copy the keystore to the compute instance (VM) before you invoke the create_clone.py script in the next step.
  6. Run the create_clone.py script on each of the nodes. The create_clone.py script is located at /opt/scripts/cloning:
    • If you have cloned only the data block volumes:
      python3 create_clone.py -d <Original_instance_data_volume_OCID>
    • If you have cloned both the data block and Middleware volumes:
      python3 create_clone.py -d <Original_instance_data_volume_OCID> -m <Original_instance_Middleware_volume_OCID>'

    Note:

    Do not run the script on Cloning instance nodes that correspond to nodes added on the Original instance with the Do Not Update Domain Configuration for Scale Out selected. The metadata for these nodes will be missing, resulting in failures at various steps in the script. On such nodes you must extend the domain in the same manner as you did on the Original instance.

    If the clone script fails at a particular stage, complete the steps in Clone Script Failed, and then return to this procedure to continue with the next step.

  7. Access the WebLogic console of the Cloning instance to verify the updates you performed to the instance. See Access the WebLogic Console.

You have successfully cloned the instance.

If you run terraform apply after cloning, complete the following steps:
  1. If you add nodes, it restores any volumes that was previously destroyed by the cloning script.
    The restored volumes can be identified if they have the following name format:
    • <clone_prefix>-data-block-<number>
    • <clone_prefix>-mw-block-<number>

    Detach and delete the restored volumes. See Deleting a Volume.

  2. If OCI logging is added then OCI logging has to be run independently on the compute instance running the administration server.
    Run the following commands on the administration server:
    python3 update_metadata.py -k use_oci_logging -v true
    python3 update_logging.py