12 Days of #Cloud: Backup #DBaaS to Cloud Container

12 Days of #Cloud: Day 10

In a previous post, I talked about enabling backups on a #DBaaS instance where backups were disabled when the instance was created. Today I show you how to create a database with Cloud Backup enabled at the time of creating the instance. To store backups on the Oracle Cloud, we need to first create a storage container.

From the dashboard, choose Storage Cloud Service. And note down the REST Endpoint URL.

The page also shows the data center. Mine is us2. Go to the Storage Console to create a new storage container to store the backups. The storage console URL is https://storageconsole.us2.oraclecloud.com where you need to substitute the correct data center instead of us2. Thanks to Gokhan for the help.

Login prompt appears:

Input the Storage Cloud REST Endpoint URL and your Cloud account username/password to get to the Storage Console. Choose “Create Container”

For regular backups and file storage needs, choose Standard. For archive backups, choose Archive. Archive Storage Service is ideally suited for infrequently accessed large-scale data sets.

I created two containers. When using these containers for backup or for storage, Oracle DBaaS expects a URL that includes the domain name and container name. The format of  the URL is https://<identity-domain>.storage.oraclecloud.com/v1/Storage-<identity-domain>/<backup-container>

If the backup container is in the same identify domain as your database, then the URL may be shortened to Storage-<identity-domain>/<backup-container> Thanks to Scott Spendolini for this info.

Now, to Cloud Database console to create an instance. Everything is pretty similar to the first Instance I created, except for the backup configuration.

Backup destination is “Both Cloud Storage and Local Storage”. The Cloud Storage Container is the REST URL for my Storage Cloud + Container Name. If you check on the “Create Cloud Storage Container”, you can specify the name of a non-existing storage container. I provided the name of an existing container (Backup001) and my domain name is usatomtrial. The Complete URL is https://usatomtrial.storage.oraclecloud.com/v1/Storage-usatomtrial/Backup001.

After about a day of running database, I can see using RMAN that the backups are happening successfully.

Here are the default RMAN configurations.

Notice
CONFIGURE CHANNEL DEVICE TYPE ‘SBT_TAPE’ MAXPIECESIZE 2 G PARMS ‘SBT_LIBRARY=libopc.so, ENV=(OPC_PFILE=/u01/ app/oracle/product/12.2.0/dbhome_1/dbs/opcDBBKCL1.ora)’;
The backups are scheduled through root cron. Database backup is scheduled once a day, and archive log backups are done every 30 minutes. You may adjust the frequency if needed.

Though backups are scheduled, an on-demand backup can be performed from the Database Cloud Console.

You may also initiate a recovery from the Database Cloud Console.

The options are to recover using the latest backup (full + archivelog backups available), or specified datetime, or specified SCN.

Click Recover, and hopefully, you will have a recovered database without DBA intervention.

 

Leave a Reply

%d bloggers like this: