By Joel Pérez ( Oracle ACED )& Kamran Agayev A. ( Oracle ACED )
In this post we will show you how to configure backup for Oracle Database in Cloud. First of all, make sure you use Oracle Storage Cloud Service and you set the replication policy. Open the following link, scroll down to Oracle Storage Cloud Service section and click “Set Replication Policy” link:
Select the data center and click Set
Next, open Oracle Database Cloud Service and create a new service. The GUI has changed and we have only 3 steps to create a database in the cloud. Provide the service name, software version and edition, upload SSH public key and click Next
In order to enable the automatic backup of the database in the cloud, you have to create a cloud storage container. Before creating a cloud storage container, switch to Oracle Storage Cloud Service details and get the REST Endpoint:
Next, open https://storageconsole.em2.oraclecloud.com/ link, provide the Service REST Endpoint and login to Oracle Storage Cloud Service:
Create a new storage container:
In the second screen of database service creation page, select “Both Cloud Storage and Local Storage” option as a Backup Destination, provide cloud storage container name, username and password and click Next.
Review the configuration and click Create button.
After creating the service successfully, open it and click on Administration section. From the Backup tab click on “Backup Now” button to create a backup of the database. You can use RMAN and schedule your own backups as well.
Click “Backup Now” and check the log file for more information. As you can see, the backup is being done.
If you switch to the storage container, you will see bunch of files created
Open RMAN and run “LIST BACKUPSET SUMMARY” command to get list of backupsets:
Now let’s try to recover the database to the specific point in time using DBaaS wizard. For this, create a new table with some data, get the current SCN number and drop the table.
Next, switch to DBaaS backup page, click “Recover”, provide the SCN number and click Recover
The recover process will run in the background automatically. Check alert.log file of the database for more information:
After the recover process is completed successfully login to the database and query the table
You can also take backup and recover the database from command line interface using bkup_api utility. Now let’s delete all backups, take a new backup and try the recovery.
Delete all available RMAN backups:
Use bkup_api utility with bkup_start parameter to take a backup from CLI:
Check the log file for more information:
Now having valid backups, let’s create a new table, drop it and recover it using dbaascli utility.
Now use dbaascli utility and provide the SCN number to perform SCN based incomplete recovery:
Now connect to the database and check if the table is recovered:
The database backups are also stored in the flash recovery area in the database host:
If you want to change the automatic backup schedule, edit /etc/crontab file with a root user. Below you can see the current schedule of the database backup:
You can use a DBaaS backup wizard, DBaaS command line interface commands and RMAN to perform backup and recovery for Oracle Database in Cloud
We hope this article can be helpful for you and see us on next article.
About the Authors
Joel Pérez is an Expert DBA ( Oracle ACE Director, Maximum Availability OCM, OCM Cloud Admin. & OCM12c/11g ) with over 17 years of Real World Experience in Oracle Technology, specialized in design and implement solutions of: High Availability, Disaster Recovery, Upgrades, Replication, Cloud and all area related to Oracle Databases. International consultant with duties, conferences & activities in more than 50 countries in 5 continents and countless clients around the world. Habitual and one of leading writers of Technical Oracle articles for: OTN Spanish & OTN Portuguese. Regular Speaker in worldwide Oracle events like: OTN LAD (Latin America), OTN MENA(Middle East & Africa), OTN APAC ( Asian Pacific), DTCC China and more. Joel has always been known for being a pioneer in Oracle technology since the early days of his career being the first Latin American awarded as “OTN Expert” at year 2003 by Oracle Corp., one of the first “Oracle ACE” globally in the Oracle ACE Program at year 2004 and as one of the biggest professional achievement in his career he was honoured as one of the first “OCMDatabase Cloud Administrator” & Maximum Availability OCM in the world. Currently Joel works as Chief Technologist in “Yunhe Enmo (Beijing) Technology Co.,Ltd”., company located in Beijing, China www.Enmotech.com
Kamran Agayev A. is an Oracle Certified Master, Oracle Clusterware Certified Expert and RAC Implement Specialist, Oracle Certified Professional (9i,10g,11g) and Oracle ACE Director working as a DBA team head at AzerCell Telecom LLC. He's author of the books Oracle Backup and Recovery: Expert secrets for using RMAN and Data Pump and Oracle Certified Master 11G Exam Guide. He runs a popular blog kamranagayev.com where he shares his experience and contributes fairly regularly to newsgroups, forums, and user group meetings and events around the world. He is a frequent speaker and presented in many countries, most recently at the USA, Japan, Thailand, China, India, Argentina, Uruguay, Panama, Costa Rica, Mexico, Guatemala, Finland and Turkey He is President of Azerbaijan Oracle User Group (AzerOUG) and delivers a class about Oracle Database Administration at Qafqaz University.