In this blog post, I’m going to cover everything you must know about database backup for different types of databases in Oracle Cloud Infrastructure.
1) In OCI there are different types of database deployment options available and according to the database, backup/restore procedures and tools differ.
There are three categories of database in OCI:
- Autonomous database: Shared/Serverless or Dedicated
- User Managed (PaaS: DBCS/ DBaaS): VM DB, BM DB, Exadata on Cloud, Exadata Cloud at Customer
- Database on Compute (IaaS: Unmanaged)
To know more about the database options on Cloud click here
2) When we take a backup of the database we have to store that backup in storage. In OCI we have two options to store database backup a) Object Storage b) Store Locally on Server
- Object Storage: high durability & availability, restore rate medium
- Local storage on Server: low durability, medium availability and restore high rate
Note: Storing locally on Server is not available for Autonomous DB and the only option for Autonomous DB is Object Storage.
3) Currently, Oracle cloud doesn’t provide the ability to attach block volume to Database Cloud Service (DB System or DBCS or DBaaS) so you can’t back up to network-attached storage (the Only option is local to server or Object Storage)
Note: To read more about OCI storage click here
4) There are two types of database backup available in OCI First, managed by Oracle and other is managed by the User.
- Managed Backup: Managed by Oracle Cloud Infrastructure
- Unmanaged Backup: backup using RMAN or DBCLI (VM/BM DB System) or bkup_api (ExaCS)
7) For database backup, the database should have the connectivity to Object Storage in OCI. You can connect the database on Cloud to Object Storage in a number of ways:
a) Service Gateway: This is the preferred way and should be used
b) NAT Gateway: If your database is in Private/Public Subnet and Service Gateway is not an option
c) Internet Gateway: If your database is in Public Subnet and Service or NAT Gateway is not an option
8) To take database backup we use a different type of Cloud Tools which includes
- OCI Console: For Autonomous & User-Managed Databases (VM DB, BM DB, ExaCS DB System)
- APIs: APIs for User-Managed DB System includes CreateBackup, DeleteBackup, ListBackup, GetBackup, Update Backup. APIs for Autonomous Database includes ListAutonomousDatabaseBackups, GetAutonomousDatabaseBackups, CreateAutonomousDatabaseBackups
- RMAN: For unmanaged backup, you create/manage your own bucket in Object Storage
- dbcli: For unmanaged backup of your VM/BM DB System to Object Storage Bucket or for BM DB to local disk in Fast Recovery Area (FRA)
- bkup_api: For unmanaged backup of your Exadata DB System to Object Storage Bucket or to local disk in Fast Recovery Area (FRA)
9) For Exadata Cloud DB System backup to object storage, make sure you configure Static routing to access Object Store. Learn more about Static routing Click here
10) With Managed Backups (managed by Oracle Cloud & Configured using OCI Console/APIs) you can configure
a) Scheduled: Weekly Full and Daily Incremental Backup
b) On-Demand Full: One-Off Full On-Demand Backup
11) With Managed Backups:
a) Backup Retention can be 7, 15, 30, 45 or 60 days
b) Backup Scheduling can be with the window of 2 Hours like 2:00-4:00 AM or 8:00-10:00 PM and so on
12) Autonomous Databases are backed up automatically (weekly full & daily incremental) and these backups are retained for 60 Days. You can also create a manual backup for Autonomous Database using console or API and these manual backups are also retained for 60 days.
Note: For manual backup, there is additional setup required like setting property default_bucket, create credentials for Object Store, etc covered in our DBA to Cloud DBA Hands-On Labs, check all Hands-On Labs here
13) Unmanaged Backups must be encrypted before they can be sent to Oracle Database Backup Cloud Service.
Next Task For You
In DBA to Cloud DBA Training, We have a Dedicated Module for Backup and Restore DB System, To Know More About How to upgrade From DBA To Cloud DBA and Which Cloud Certification Useful for DBAs & Earn More by Registering for our FREE Masterclass.