Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Minimal Effort OAC DR Solution: REST API-Based Snapshot Restoration Using Shell Script

116
Views
0
Comments
Subha_Tripathy-Oracle
Subha_Tripathy-Oracle Rank 6 - Analytics Lead

This discussion is continuation of my previous post:

After successful automating snapshot backup to OCI storage bucket, you can restore the snapshot to the same OAC instance as well as to a different OAC instance.

Step 1 : Create a shell script for the token generate command constructed in Step 4(From here) similar to OAC_gen_token.sh for the target instance (as mentioned above target instance could be the same instance).

Rename OAC_gen_token.sh to source_token.sh and the newly created one for the target instance as target_token.sh.

Step 2 : On the server/mac you will run the restore snapshot script as a prerequisite you need to install jq package.

sudo yum install jq

jq is a programming language which is used to handle JSON files . No need to worry about updates for jq as it will be taken care by quarterly linux patching cycle.

Step 3 : From the below screenshot copy the number 3005242109 and provide it as input to the API_Snapshot_restore_daily.sh script

Update the API_Snapshot_restore_daily.sh as below:

Run the script as :

API_Snapshot_restore_daily.sh 3005242109

Step 4: Get the work request ID from the log of API_Snapshot_restore_daily.sh

Status will show "IN_PROGRESS" if the script is successfully kicked off.

Keep checking the status until it is "SUCCEEDED"

Once the status changes to Succeeded, you can login into the target instance and validate the restore.

Attachments:-

Note:-

  1. API_Snapshopt_backup_daily.sh has a slight change in the date variable format which supports multiple backup in a day. Attached the updated copy in this post. Please rename the above two scripts as API_Snapshopt_backup_daily.sh and API_Snapshot_restore_daily.sh before you start using the same.
  2. As mentioned in my earlier post, RDG server can be utilized for these scripts to be scheduled.

Tagged: