Playing with Oracle Database Cloud – Migrating to Cloud using an Oracle Cloud Backup

The idea for this scenario is to learn how to migrate an Oracle Database from on-premises to Oracle Cloud DBaaS by using a previously done backup using Oracle Cloud Backup Services.

First, we will create an Oracle Database Cloud Services database deployment (DBaaS) whose database is instantiated from a cloud backup created by using Oracle Database Backup Cloud Service (As per my previous post here). This option is common option to migrate databases to Oracle Cloud.

In brief, we will create a Database Cloud Service database deployment hosting a single-instance database (with the same characteristics as our source database were the backup was taken) and then afterward, replace the newly created database by using another database’s backup stored at Oracle Database Backup Cloud Service. This technique is often called “instantiate from backup” and the database from which the backup was made is called the “source database”.

Ensure that your RMAN Auto backup controlfile is ON. If this is not enabled on the source database when doing the Cloud Back this complete replication process will fail.

Now is time to get started. Let start by creating the new Oracle Database Instance by pressing Create Instance on the Oracle Database Cloud Service Console as below:

The next step is to create the Database Cloud Service database deployment whose database you will replace later by using the backup on Oracle Database Backup Cloud Service. Here are some notes with regards to the available options on this page:

Instance Name: Enter the name you want for your instance.

Region: Select the Region of your preference, if any.

Software Edition. Choose at the minimum a software edition that supports the options used by the source database.

Service Level: Enter the service you wish to create: Oracle Database Cloud Service or Oracle Database Cloud Service – Virtual Image. For this scenario let’s choose Oracle Database Cloud Service.

Metering Frequency: You can choose between hourly or monthly. Monthly gives you a fixed price for the monthly usage and hourly charges you only for the hours your instance is up and running. For this scenario, we will choose hourly.

Software Release. Options are: 11gR2, 12cR1, 12cR2 and 18c. For this scenario, we will choose 11gR2 due that our source database backup is using this release.

Now is time to enter the Instance details, the most important areas on this page are:

DB Name (SID). You can specify any SID you want, but if you want to use the same SID as the database from which the existing backup was made, you must make sure the SID you provide matches exactly, including the case of letters. For example, if the existing backup’s database SID is Orcl, you must use Orcl, not orcl or ORCL.

Usable Database Storage (GB) . Specify at the minimum the amount of storage needed to accommodate the source database. If the source database is bigger than you can specify when creating the database deployment, create the deployment and then scale up the data storage as required by following the instructions in Scaling Up the Storage for a Database Deployment.

Enable Oracle GoldenGate. Do not choose this option, as the database is going to be replaced.

Backup Destination. Choose the option you want, even None. The instantiate-from-backup technique works even if the deployment is not being backed up.

Create Instance from Existing Backup. Choose No. You will be replacing the database after the deployment is created.

After complete all required inputs, please clik “Next”.

Next, review all given details and press create.

You can now see that the new Instance is being created.

In the main time, let’s connect to our source database and check for the DBID. (We will need this information later)

SQL> select dbid from v$database;

Also, let’s connect to our Storage Classic to check the name of our Container that contains our back.

When the instance creation is completed, click on the new instance name (1), select the top right menu (2) and click on “Replace Database using Backup” (3).

In the replace database using backup page, please enter:

Check the On-Premisses Backup box. This means that we will be using a backup of an on-premises database saved in the Oracle Cloud.

Database ID: Enter the DBID we previously queried from the source database.

Decryption Method: Due that on my previous post we created the backup using a word encryption key (not wallet for RMAN), we will enter here the encryption key used by RMAN when doing the backup to Cloud (On my example post we used the word “oracle”).

Cloud Storage Container: Please enter the Storage Container used for your backup. It would be Storage-<Your Cloud Identifier>/<Name of Container from the Storage page we checked before>

Username: Username used for the Storage Container (Username used when installing the Oracle Cloud Backup Control Module)

Password: Password of the user above

Administration Password: The Administration Password of your Target Instance (Entered when created the DaaS Instance)

After entering all these details, please click on “Replace Database”.

Read the warning popup and press “Continue”.

Now at the Oracle Database Cloud Service Console, you can see that the “fcotest” instance is on service maintenance and the magic is in progress.

We can check the status of the process by clicking at the Instance name (1), then on the top right menu (2) and then on the menu option “View Activity”.

Here in the image bellow you can observe the current status of the job, that in the example bellow is “Succeeded”.

Now when connecting to the new (target) database, we can see it has the same number of datafiles as per our source database, and all our data is now there.

Note: You can check the process logs at this location on the target instance: /var/opt/oracle/log/AWS11G/dbaasapi/db/ibkp/

Very easy, right? Feel free to play with it and share this tutorial with all your peers. Remember “Knowledge is only valuable if shared” 😉