Backing Up an Autonomous Database Manually
This topic describes how to create manual backups of Autonomous Databases. You can use the Oracle Cloud Infrastructure Console or the API to perform these tasks.
Oracle Cloud Infrastructure automatically backs up your Autonomous Databases and retains these backups for 60 days. Automatic backups are weekly full backups and daily incremental backups. You can also create manual backups to supplement your automatic backups. Manual backups are stored in an Object Storage bucket that you create, and are retained for 60 days.
During the backup operation, the database remains available. However, lifecycle management operations such as stopping the database, scaling it, or terminating it are disabled.
To create or manage Autonomous Database backups, you must be given the required type of access in a policy written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment you should work in. See Authentication and Authorization for more information on user authorizations for the Oracle Cloud Infrastructure Database service. See Let database and fleet admins manage Autonomous Databases for sample Autonomous Database policies. See Details for the Database Service for detailed information on policy syntax.
- To create a manual backup for an Autonomous Database, you must first configure an Object Storage bucket to serve as a destination for your manual backups. See Setting Up a Bucket to Store Manual Backups for instructions.
Using the Console
Open the navigation menu. Click Oracle Database. Under Autonomous Database, click Autonomous Data Warehouse, Autonomous JSON Database, or Autonomous Transaction Processing.
- Choose your Compartment.
- In the list of Autonomous Databases, find the database that you want to back up.
- Click the name of the Autonomous Database to display the Autonomous Database details.
- In the database details page, click Create Manual Backup.
The create Manual Backup dialog box is displayed.
- If you have properly configured your database for manual backups, continue to step 6.
- If the database is not properly configured for manual backups, a message box informs you that you must first configure the database before you can create a manual backup. See Setting Up a Bucket to Store Manual Backups for instructions.
- Click Close, configure your database according to the instructions, and click Create Manual Backup again.
- In the Create Manual Backup dialog box, enter a name for your backup. Avoid entering confidential information.
- In the Create Manual Backup dialog box, click Create. Note
Your backup may take several hours to complete, depending on the size of your database.
Optionally, you can check the state of your backup in the list of backups on the database details page. For some states, an information icon () is displayed to provide additional details regarding the state or ongoing operations like deletions. The backup has one of the following states:
Using the API
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.
Use these API operations to manage Autonomous Database backups:
Setting Up a Bucket to Store Manual Backups
You must create an Oracle Cloud Infrastructure Object Storage bucket to hold your Autonomous Database manual backups and configure your database to connect to it. This is a one-time operation.
Some of the steps in this procedure require you to connect to the database by using an Oracle Database client such as SQL Developer. See Connecting with Oracle SQL Developer (18.2 or later) for information and instructions on connecting to an Autonomous Database.
If you have not already done so, generate an auth token for the Oracle Cloud Infrastructure Object Storage user to access the bucket you create in the next step. See To create an auth token to learn how to do this. (You will need this auth token for the database credential you create in step 4.)
For example, if your backup bucket is named "backup_database1", the URL would be:
When you create your bucket:
- Pick Standard as the storage tier. Manual backups are only supported with buckets created in the standard storage tier.
- Ensure that you use the database name, and not the display name, as the bucket name.
Using an Oracle Database client, log in to the database as the administrator and set the database
DEFAULT_BACKUP_BUCKETproperty to the URL of your Object Storage bucket. The format of the tenancy URL is https://swiftobjectstorage.region.oraclecloud.com/v1/object_storage_namespace/bucket_name.
ALTER DATABASE PROPERTY SET default_backup_bucket='https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/ansh8lvru1zp/backup_database1';
In the example, the Object Storage namespace is ansh8lvru1zp.Tip
Do not use a pre-authenticated request URL.
With the tenancy user and the auth token referenced in step 1, create the credential for your Oracle Cloud Infrastructure Object Storage account. Use
DBMS_CLOUD.CREATE_CREDENTIALto create the credential. Note that you need to run this command as the ADMIN user.
BEGIN DBMS_CLOUD.CREATE_CREDENTIAL( credential_name => 'DEF_CRED_NAME', username => 'email@example.com', password => '<auth_token>' ); END; /
For more information on creating this credential, see CREATE_CREDENTIAL Procedure.
Set the database property
default_credentialto the credential you created in the previous step.
ALTER DATABASE PROPERTY SET DEFAULT_CREDENTIAL = 'ADMIN.DEF_CRED_NAME';
To list the current value for the default bucket, run the following command:
SELECT PROPERTY_VALUE from database_properties WHERE PROPERTY_NAME='DEFAULT_BUCKET';
After completing these steps you can create manual backups at any time.
Manual Backup Notes
Database configuration considerations:
- If you previously configured manual backups using the
DEFAULT_BUCKETproperty, you do not need to make any changes to perform manual backups with your existing configuration. In this case, the
DEFAULT_BUCKETproperty is set to the value of Oracle Cloud Infrastructure Object Storage tenancy URL and the required bucket name is in the format of
backup_databasename, where databasename is lowercase. However, Oracle recommends that you configure Autonomous Database for manual backups using the
- If you previously configured Autonomous
use manual backups using the
DEFAULT_BUCKETproperty and created backups, then after configuring the
DEFAULT_BACKUP_BUCKETproperty to use a new manual backup bucket, the old manual backups in the old bucket are not available for restore. If you want to use the old backups then you must change the value of the
DEFAULT_BACKUP_BUCKETproperty to specify the URL of the old manual backup bucket.
- If you previously configured Autonomous Database to use manual backups and you rename your Autonomous Database, then your backups will continue to work without changes.
Manual backup details:
- Each manual backup creates a full backup on your Oracle Cloud Infrastructure Object Storage bucket and the backup can only be used by the Autonomous Database instance when you initiate a point-in-time-recovery.
- The retention period for manual backups is the same as for automatic backups, which is 60 days.
While backing up a database, the database is fully functional. However, during the backup the lifecycle management operations, such as stopping the database, are not allowed.