Recently I created a physical standby database using ZDM for one of the big Oracle Database Migration. After creating the standby database, ... Read More
How to Setup Scheduled Backup of Compute Instance in OCI
In this blog, post I will show you how to take a backup of compute instance and schedule it.
There are 2 Backup Types Available:
Full = Includes all changes since the volume was created
Incremental = Includes only the changes since the last backup
So a backup of compute instance basically means backup of “Boot volume + block volume.”
This is the point-in-time backup of data to Object Storage.
1. Create a Backup policy:
First, we need to create a backup policy to attach to the volume group, so it automatically takes backups as per policy.
Go to OCI –> Click on Storage –> Block Storage –> Backup Policy
You will see we already have 3 Oracle-defined policies.
Note: Oracle-defined backup policies are not supported for scheduled volume group backups.
So let’s create a user-defined backup policy:
Click on create backup policy and provide any name, I am not using any cross-region copy target so keep None and click on Create Backup Policy.
Now we need to add a schedule for backups, click Add Schedule
Add Schedule for full backup (I am taking a weekly full backup), click add schedule.
Now click again on add a schedule and add for incremental backup
You can see both schedules
2. Create a Volume Group:
A volume group can include both types of volumes, boot volumes, which are the system disks for your compute instances, and block volumes for your data storage.
Go to OCI –> Click on Storage –> Block Storage –> Volume Groups
Click on Create Volume Group, give any name and select availability domain, and click next
Next, select the volumes used in compute instance (boot volume + if you are using any block volume)
I have one block volume attached to my VM, so I select boot volume + one block volume. If you are using more block volumes, add all here.
click next, I am not enabling cross-region replication
Next, select the backup policy we created earlier
Next review the summary page for all info and click Create
It takes a few seconds and the volume group will create.
3. After a few days when you Click on Volume Group Backups you will see the volume group backups as per the job policy.
something like that
This way we can take or schedule compute instance backups.
In the next blog, I will show you how to restore from volume group backup and create a new instance.
More from this Author
Container Instance: OCI Container Instances enables you to easily run applications on serverless compute optimized for containers. Using ... Read More