Oracle Autonomous Database offers a great feature for creating refreshable clones. These clones are typically refreshed hourly, which works well for many use cases. However, if your business requires a shorter refresh interval to meet more demanding availability or recovery goals, you can configure your clone to update much more frequently.

Here’s how you can set up a refreshable clone to update every 10 minutes, for example, giving you a near real-time replica of your data. 

Important Considerations:

  • Your source database stays online. Your original database remains fully operational and accessible throughout the entire process, so there’s no interruption to your live environment.

  • The clone is for reading only. The target database is accessible in read-only mode, so you can’t make any changes to it. During a refresh, the clone automatically closes and then reopens once the update is complete, ensuring data consistency.


 

Steps to Create and Refresh an Autonomous Database Clone

  1. Create an Autonomous Transaction Processing (ATP) instance in OCI
  2. Provision a Compute VM and install Python + OCI CLI:
sudo dnf -y install oraclelinux-developer-release-el9
sudo dnf install python39-oci-cli

Reference: Installing OCI CLI

 

  1. Configure authentication:
    • Upload the public key to the tenancy: How to upload the public key
    • Update the OCI CLI config file with the private key path (~/.oci/config):
[DEFAULT]
user=ocid1.user.oc1..aaaaaaaazxptooooamiupiiqq
fingerprint=3d:04:ce:f3:xpto:7f:cf:xpto
key_file=/home/opc/.oci/oci_api_key.pem
tenancy=ocid1.tenancy.oc1..xpto….6s23tsco4a5a
region=eu-madrid-1
pass_phrase=Xxppttoo#123#

 

  1. Create the refreshable clone manually:
oci db autonomous-database create-refreshable-clone \
  –compartment-id <your_compartment_ocid> \
  –db-name atpclone \
  –display-name atpclone \
  –source-id <your_source_db_ocid> \
  –compute-model ECPU \
  –compute-count 4 \
  –refreshable-mode MANUAL \
  –data-storage-size-in-tbs 1

 

  1. Manually refresh the clone using a timestamp 10 minutes in the past:
oci db autonomous-database manual-refresh \
  –autonomous-database-id <your_clone_db_ocid> \
  –time-refresh-cutoff=$(date -u -d ’10 minutes ago’ +”%Y-%m-%dT%H:%M:%SZ”)

 

  1. Automate the refresh with a shell script to be executed every 10 minutes via crontab:
#!/bin/bash
# Set your Autonomous Database OCID here
ADB_OCID=”ocid1.autonomousdatabase.oc1.eu-frankfurt-1.axptoxptoxptoxptoxptouq”
# Get current UTC time minus 10 minutes
CUTOFF_TIME=$(date -u -d ’10 minutes ago’ +”%Y-%m-%dT%H:%M:%SZ”)
# Run the manual refresh command
oci db autonomous-database manual-refresh \
  –autonomous-database-id “$ADB_OCID” \
  –time-refresh-cutoff “$CUTOFF_TIME”
# Optional: Log the execution
echo “$(date): Clone refresh triggered with cutoff time $CUTOFF_TIME” >> /var/log/clone_refresh.log

 

  • Gave execution permissions:
chmod +x refresh_clone.sh

 

  • Configure the cron job:
crontab -e
*/10 * * * * /home/opc/clone/refresh_clone.sh

 

  1. Validate execution through logs and the OCI console:
[opc@instadb2 clone]$ cat clone_refresh.log
Wed Aug 6 01:00:02 PM GMT 2025: Clone refresh triggered with cutoff time 2025-08-06T12:50:01Z
Wed Aug 6 01:10:02 PM GMT 2025: Clone refresh triggered with cutoff time 2025-08-06T13:00:01Z

 


Conclusion

By combining manual refreshes with cron automation, it is possible to maintain a refresh interval as short as 10 minutes for Autonomous Database clones. This approach provides a practical workaround when business requirements demand faster refresh cycles than the default 1-hour minimum supported by Oracle Autonomous Database.