Saving data in the cloud

Saving data in the cloud

Published on: Category: Oracle

Trial Oracle’s Database as a Service (DBaaS) in the cloud

Since the introduction of DBaaS in the cloud, we wanted to know more. What is the impact for customers? What is the impact for database administrators? Is it as easy as Larry promised? With that in mind, being an Oracle Partner, we arranged a trial DBaaS. We will explore the Database & Java in the Oracle Cloud and share our experiences in blogs. In this blog we will address backups and recovery.

Will my databases in the cloud be saved forever?

Well …. NO! You are still responsible for the backups of your own databases. Of course: Oracle offers services to help you with it, but by default not that much is configured.

What has been configured for my database-backups?

It was quite a hunt to find out what has been configured by default. When we look at the DBaaS-dashboard it looks like nothing has been configured:

Let’s have a look at the jobs in OEM:

Hmm, I am only able to watch running jobs. Oracle offers a basic version of OEM, in which it is not possible to look at the configured jobs. The next option I can think of checking is the scheduler in Oracle itself. But when I search for jobs containing terms like ‘backup’ or ‘online’ no jobs are returned.

The last option I can think of is to use cron to schedule it. But in Oracle’s crontab on the server nothing has been configured.

Let’s have a look at RMAN. What backups do we see there?

Now we can see that regular backups are running. But where is the schedule? Since it is a bit of a strange configuration, we consulted Oracle support (by chat). Within minutes we got the link to this special configuration.

What does the manual teach us?

  • login as user opc on our DBaaS server
  • type sudo -s to become root
  • let’s look in /etc/crontab:
The above is the line that starts the daily backup.

Am I allowed to edit the scheduled backups?

Yes you are:

  • cp /etc/crontab /etc/crontab.bak
  • vi /etc/crontab and change to schedule to what you want
  • When you want to disable the backup, you have to remove the whole line:
  • 01 01 * * * root /var/opt/oracle/bkup_api/bkup_api bkup_start
  • Uncommenting is not sufficient!
  • Save the file en leave vi :wq
  • Be aware that using the normal crontab-tool does not work, you have to edit /etc/crontab
     

Can we restore?

Yes we can! 

To be able to perform a restore I dropped the database. Since the backups are made on disk, the restore is quite easy to perform and actually has nothing to do with the Oracle cloud.

In a nutshell what I have done to restore, recover and open the database:

  • restore spfile and controlfile
  • startup mount
  • restore database (be aware that you need to create some directories by hand!)
  • recover database
  • open database with resetlogs
     

Conclusion

Read the manual! The troubles I have had with finding out how the backup is scheduled is documented, you only have to find the appropriate document that helps you. It looks like Oracle scheduled a default daily backup ‘just to be sure’ there is something to fall back on. When you are serious: schedule your own backups so point-in-time-recovery will be possible.

Be aware that the backups are stored on disk in your virtual host. Oracle has a service ‘database backup’ that stores backups in the cloud, but that is not configured for DBaaS. It was out of the scope for this trail to have a look at other services in the cloud.

Our advice:

  • arrange backups yourself
  • configure cloud container storage for “offsite” backups
Pierre van der Ven
About the author Pierre van der Ven

Pierre van der Ven is an enthusiastic and result-oriented colleague with ICT-workexperience since 1998. His knowledge and experience are mainly in the field of Oracle databases. In recent years, Pierre has grown his knowledge of SQL Server.

More posts by Pierre van der Ven
Comments
Reply