CodexBloom - Programming Q&A Platform

OCI Autonomous Database: implementing Automatic Backups Not Retaining Custom Retention Policy

๐Ÿ‘€ Views: 1473 ๐Ÿ’ฌ Answers: 1 ๐Ÿ“… Created: 2025-06-09
OCI Autonomous Database Backups Python

I tried several approaches but none seem to work... I'm testing a new approach and I need help solving I am currently using Oracle Cloud Infrastructure (OCI) to manage an Autonomous Database, and I've configured a custom retention policy for backups... However, I noticed that even after setting the retention policy to 30 days, the database is only retaining backups for 7 days. I have verified that the policy is applied correctly in the OCI console. Hereโ€™s the code I used for setting the retention policy via the OCI SDK for Python: ```python import oci config = oci.config.from_file() # Load the configuration file client = oci.database.DatabaseClient(config) database_id = 'your_database_id' retention_days = 30 response = client.update_autonomous_database( autonomous_database_id=database_id, update_autonomous_database_details=oci.database.models.UpdateAutonomousDatabaseDetails( backup_retention=retention_days ) ) ``` After executing this code, I checked back a week later, and the retention policy is still showing as 7 days. Iโ€™ve also tried using the OCI CLI to set the retention policy: ```bash oci db autonomous-database update --autonomous-database-id your_database_id --backup-retention 30 ``` Still, the scenario continues. I havenโ€™t encountered any behavior messages when executing these commands, and Iโ€™m unsure if there are any additional configurations I might be missing. Did I overlook something in the setup, or is there a limitation with the retention policy that I need to be aware of? Any insights would be greatly appreciated! I appreciate any insights! This is my first time working with Python LTS. Thanks for taking the time to read this! The stack includes Python and several other technologies. Thanks in advance!