๐น Introduction
When managing backups for Oracle databases, especially in cloud or hybrid environments, uploading RMAN backups to Oracle Cloud Object Storage is a cost-effective and scalable solution. In this blog, I’ll walk you through an easier and lightweight method—using Pre-authenticated Requests (PARs) instead of configuring the full backup module.
Ideal for:
-
One-time uploads
-
Lightweight databases
Automation without exposing full credentials
๐น What is a Pre-authenticated Request (PAR)?
A PAR is a temporary URL that allows access to a specific Object Storage bucket or object without needing a user login or an API key. You can upload, download, or delete files securely with an expiry date
๐น Use Case
✔️ You take local RMAN backups on a DB server (on-prem or OCI VM)
✔️ You want to push them to Oracle Object Storage for disaster recovery
✔️ You don’t want to configure Oracle Backup Module or DB System native integration
๐น Step-by-Step: Create PAR and Upload RMAN Backup
✅ Step 1: Take Your RMAN Backup
Example RMAN command (level 0 full backup):
✅ Step 2: Create a Bucket in OCI
From the OCI Console:
-
Go to Object Storage → Buckets
-
Click Create Bucket
-
Name:
rman-backups
-
Storage Tier: Standard
Encryption: Default
-
✅ Step 3: Create a Pre-authenticated Request (PAR)
Go to the bucket → Pre-authenticated Requests → Create PAR
-
Name:
upload-rman-backup
-
Access Type: Permit uploads to this bucket
-
Expiration: e.g., 7 days
-
Click Create Pre-authenticated Request
You’ll get a URL like:
✅ Step 4: Upload Using curl
or rclone
Assuming your RMAN backup is /u01/app/oracle/backup/rman_abc123.bkp
:
Done! Your backup is now in OCI Object Storage.
✅ Optional: Automate the Upload in Shell Script
Schedule via cron to run after your backup job.
๐ Security Note
-
Never share PAR URLs publicly—they provide direct access.
-
Always set an expiration on PAR.
Delete the PAR once upload is completed (via Console or CLI).
๐ก Vignesh’s Tip
You can also create PARs using the OCI CLI:
Useful for scripting and DevOps workflows.
๐น Conclusion
Using Pre-authenticated Requests for RMAN backup uploads is a fast, secure, and flexible alternative to more complex OCI-native integrations. Whether you are an on-prem DBA or working in OCI VMs, this method helps you back up to the cloud without complexity.
No comments:
Post a Comment