Replace Domain and Binaries
Replace the domain and binaries in the Oracle WebLogic Server for OCI instance.
Complete the following steps:
- 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 .
- 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, as the binaries are the same on each VM.
cd /u01/data/domains tar cvf /tmp/domain.tar .
- Set up a ssh access from the Oracle Java Cloud
Service instance to the Oracle WebLogic Server for
OCI instance:
- On the source instance generate a public key from the private key that is in the
oracle
user's home:# Must be run as oracle user. If you are the opc user, run 'sudo su - oracle' first. ssh-keygen -y -f ~/.ssh/id_rsa
- Save the output.
- Access the Oracle WebLogic Server for
OCI instance as the
opc
user. - On each VM in the Oracle WebLogic Server for
OCI instance append the output to the
authorized_keys
for theoracle
user:sudo su - oracle vi ~/.ssh/authorized_keys # add the public key to this file.
- 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/
- On the source instance generate a public key from the private key that is in the
- Copy the
domain.tar
,mw.tar
, andjdk.tar
files to the Oracle WebLogic Server for OCI instance:- Access the Oracle Java Cloud
Service instance as the
opc
user and run scp to copy the tar files from each VM to the corresponding VM on the Oracle WebLogic Server for OCI instance.In the following example there is a single VM on the Oracle WebLogic Server for OCI instance with an IP address10.1.1.1
: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/
- Ssh to the Oracle WebLogic Server for
OCI instance as the
opc
user and on each VM run the following tountar
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/
- Access the Oracle Java Cloud
Service instance as the
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, then add a new volume and transfer the data using the above steps in this topic.