Categories
- All Categories
- 86 Oracle Analytics News
- 7 Oracle Analytics Videos
- 14.1K Oracle Analytics Forums
- 5.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 48 Oracle Analytics Trainings
- 59 Oracle Analytics Data Visualizations Gallery
- 2 Oracle Analytics Data Visualizations Challenge
- 4 Oracle Analytics Career
- 4 Oracle Analytics Industry
- Find Partners
- For Partners
Minimal Effort OAC DR Solution: REST API-Based Snapshot Restoration Using Shell Script
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:-
- 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.
- As mentioned in my earlier post, RDG server can be utilized for these scripts to be scheduled.