12 Days of #Cloud: Enabling #DBaaS Backups

12 Days of #Cloud: Day 6

When I created the #DBaaS instance, did not create a backup policy. I chose the backups as “None”. Now that some work has been done on the database, would like to create an adhoc backup as well as want to schedule regular local disk backups.

On-demand backup can be performed by running script “/var/opt/oracle/bkup_api/bkup_api bkup_start” as the root user.

Oops, no backup configured! So, for the first time, we need to configure backup before we can perform a backup.

Reference: Oracle Documentation

Backup configuration is saved in file /var/opt/oracle/ocde/assistants/bkup/bkup.cfg. Let’s edit the file and add required parameters.

BKUP_DISK is for local disk backup, and enabled local backup by setting this parameter to YES. Local disk backups are written to the Flash Recovery Area, which is /u03/app/oracle/fast_recovery_area directory. The parameter BKUP_OSS is to write backups to Oracle Cloud Storage.

The bkup script, backup assistant, created few cron jobs to do the backup periodically.

Let’s kick off the backup again.

Backup failed! This time, it was due to insufficient local storage to hold the backup. Since I chose no backup option, Oracle Cloud Service did not allocate storage to perform backups to /u03 file system. The database was created in ARCHIVELOG mode, and the Cloud Service setup a cron job to remove the archivelog files hourly.

It took a while to figure out how to add storage to /u03 file system. More storage is added to the standard file systems by using the “Scale up or down Resources” menu item.

Added 50G to “Backup Storage Volume”, which is /u03. 6G volume is now 56G.

Adding disk space alone is not sufficient, need to increase the Fast Recovery Area as well.

Though backup is scheduled to run periodically using the cronjobs, lets kick off a backup to verify if the added storage in /u03 resolved the backup issue.

Voila, successful backup!

DBaaS monitor console also shows the status.

The /home/oracle/bkup/CDDB01/obkup cron job performs operating system file backups. The file backups are based on two configuration files, and their contents are:

As you can see, all important files from the Operating System are backed up. If you have directories to be backed up, add to the dbcfg.spec file.

Enabling and performing cloud backups is also using similar steps. Update these parameters accordingly in the bkup.cfg file.

 

3 Responses to 12 Days of #Cloud: Enabling #DBaaS Backups

  1. Pingback: 12 Days of #Cloud: Backup #DBaaS to Cloud Container » Biju's Oracle Notes

  2. If I have added OS directories or OS files to the dbcfg.spec file. How do I restore a OS file>

Leave a Reply

%d bloggers like this: