Replace the Domain and Binaries

Replace the domain and binaries in the Oracle WebLogic Server for OCI instance.

Complete the following steps:
  1. Access the VM running the WebLogic administration server in the Oracle Java Cloud Service instance and run the following commands to preserve the WebLogic domain and binaries:
    sudo su - oracle
    cd /u01/data/domains
    tar cvf /tmp/domain.tar .
    cd /u01/app/
    tar cvf /tmp/mw.tar .
    cd /u01/jdk/
    tar cvf /tmp/jdk.tar .
  2. Log in as an oracle user and ssh to each additional VM in the Oracle Java Cloud Service instance, and preserve the WebLogic domain contents.

    You do not have to save the binaries from each VM because the binaries are the same on each VM.

    cd /u01/data/domains
    tar cvf /tmp/domain.tar .
  3. Use OCI Object Storage to upload the tar files to a bucket that is accessible to the compute instances in the Oracle WebLogic Server for OCI deployment. See Uploading Objects to a Bucket or Folder.
  4. Access the Oracle WebLogic Server for OCI instance as the opc user.
  5. On each VM in the Oracle WebLogic Server for OCI instance, run the following command to move the contents out of the current domain, middleware home, and JDK home:
    sudo su - oracle
    mkdir /tmp/domain_bak
    mv /u01/data/domains/* /tmp/domain_bak/
    mkdir /tmp/mw_bak
    mv /u01/app/* /tmp/mw_bak/
  6. Download the domain.tar, mw.tar, and jdk.tar files from object storage into the /tmp directory. See Downloading an Object from a Bucket or Folder.
    sudo su - oracle
    scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/domain.tar 10.1.1.1:/tmp/
    scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/mw.tar 10.1.1.1:/tmp/
    scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /tmp/jdk.tar 10.1.1.1:/tmp/
  7. ssh to the Oracle WebLogic Server for OCI instance as the opc user and on each VM run the following to untar the source instance domain:
    sudo su - oracle
    tar xvf /tmp/domain.tar -C /u01/data/domains/
    tar xvf /tmp/mw.tar -C /u01/app/
    mkdir /u01/app/oracle/jdk
    tar xvf /tmp/jdk.tar -C /u01/app/oracle/jdk/

Note:

Oracle WebLogic Server for OCI creates only a data and block volume. If you created additional volumes for your Oracle Java Cloud Service instance, add a new volume and transfer the data using the above steps.