Prepare to Migrate Data

To prepare for data migration, begin by downloading the Oracle Database Cloud Backup Module, configure the environment variables for ORACLE_SID and ORACLE_HOME, and create a wallet on the source database. You'll need to use this information to install and configure services on the target database in the cloud.

Download the Oracle Database Cloud Backup Module and Configure the Environment Variables

Download the Oracle Database Cloud Backup Module on the source database and configure the environment variables. The module enables you to back up to the Oracle Database Backup Cloud Service.

  1. Download the Oracle Database Cloud Backup Module.

    The zip file contains 2 folders, opc_install and oci_install. We'll use the oci_install.jar file in the oci_install folder for backing up data to Oracle Cloud Infrastructure Object Storage.

  2. Upload the oci_install.jar file, located in the oci_install folder, on the source database server.
  3. Change ownership of the file to the oracle user, then move the file to the oracle user home folder.
    chown oracle:oinstall oci_install.jar 
    sudo mv oci_install.jar /home/oracle/
  4. As the oracle user, configure the environment variables for ORACLE_SID and ORACLE_HOME.
    . oraenv

Create a Wallet on the Source Database

Create a wallet on the source database and save the public key. The wallet is used to encrypt the backup and is needed to decrypt the backup on the target database. The public key will enable access to Oracle Cloud Infrastructure Object Storage.

  1. Log into the source database system as the oracle user.
  2. Create a wallet in ORACLE_HOME on the source database.
    mkdir -p $ORACLE_HOME/data/wallet
    java -jar oci_install.jar -newrsakeypair -walletDir $ORACLE_HOME/data/wallet
    Private and public signing keys are created and the path is displayed in the output.
  3. Display the public key file.
    cat $ORACLE_HOME/data/wallet/oci_pub
  4. Copy and save the public key, including the header and footer statements.
    You'll add the public key to your Oracle Cloud Infrastructure account profile later.
    -----BEGIN PUBLIC KEY-----
    MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAypssDkZf3L8wZ9wrcCKu
    SADWhTBJwOqWbO/1yK1CNecKcn7KDlgVms8+KavG9ZUGTi1psRgjwwLOTGcMrZFQ
    NLmCgGTPr4/i88xcE2Vg56tftgomgAOTZ8qcx+UzDqRxb/mmVwoVxz4TUQin8Ap+
    NOWRaLrJQCT1iIHsSvkXJRTTepbyjvh5D11BDkzv7G/4lL6sXHAfhCiGNs8dZt8e
    315j4hyApdxhaJxVYCprgcmJVRMzsXlF/jNuKXDsh/mRbz3rgmfWEAAsOyqiS/CU
    gUW1rdldZeeVxyR/Cni/UPnNXZeY6l7yZ3VF7kBzWJXspOi4j9n4wQfQHZrbNhR+
    mQIDAQAB
    -----END PUBLIC KEY-----
    
  5. Make a copy of the wallet file by zipping the wallet folder without the path (-j flag).
    The wallet is used to encrypt the backup and is needed to decrypt the backup on the target database.
    zip -j wallet.zip $ORACLE_HOME/data/wallet/*
  6. Download the zipped wallet file to your local instance. You'll upload this file later using SCP.