Manual Backups on Autonomous Database

In addition to automatic backups that Autonomous Database regularly performs, you can take manual backups at any time.

Configure Manual Backups on Autonomous Database

Follow these steps to configure the Oracle Cloud Infrastructure Object Storage credentials and tenancy URL for manual backups and to create the Oracle Cloud Infrastructure Object Storage bucket to store manual backups.

To configure your database for manual backups, do the following:

  • Create an Oracle Cloud Infrastructure Object Storage bucket for manual backups

  • Set database property DEFAULT_BACKUP_BUCKET to specify the manual backup bucket on the Oracle Cloud Infrastructure Object Storage

  • Define the Oracle Cloud Infrastructure Object Storage credentials

  • Set the database property DEFAULT_CREDENTIAL database property

These manual backup configuration tasks are a one-time operation. After you define your credentials and your tenancy URL you can initiate manual backups without doing the same operations again unless the URL, the credentials, or the bucket change.

To perform the manual backup configuration tasks you need to connect to your database and perform the required DDL commands. For example, connect to your database with SQL Developer or SQL*Plus. See Connect to Autonomous Database Using Oracle Database Tools.

  1. Create an Oracle Cloud Infrastructure Object Storage bucket for manual backups for your database. Specify the bucket name to meet your manual backup needs.
    1. Open the Oracle Cloud Infrastructure Console.
    2. Select Object Storage from the menu.
    3. Select Object Storage from the submenu.
    4. Click Create Bucket.

      This displays the Create Bucket dialog.

    Manual backups are only supported with buckets created in the standard storage tier, make sure you pick Standard as the storage tier when creating your bucket. For information on the Standard Object Storage Tier, see Overview of Object Storage.

    The format of the URL to specify a bucket is:

    https://swiftobjectstorage.region.oraclecloud.com/v1/namespace-string/bucket_name

    For example, if you provision an Autonomous Database named DB2020AA, then the bucket name that you create could be DB2020AABAK (you can use any valid bucket name). Following the same example, the URL of this bucket in the us-phoenix-1 region is:

    https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/namespace-string/DB2020AABAK

    Where namespace-string is the Oracle Cloud Infrastructure object storage namespace. See Understanding Object Storage Namespaces for more information. See Regions and Availability Domains for a list of regions.

  2. Set the database property DEFAULT_BACKUP_BUCKET to identify the manual backup bucket in your Oracle Cloud Infrastructure Object Storage. You need to perform this step as the ADMIN user.
    1. Set the database property DEFAULT_BACKUP_BUCKET to specify the manual backup bucket URL.

    For example:

    ALTER DATABASE PROPERTY SET default_backup_bucket='https://swiftobjectstorage.us-phoenix-1.oraclecloud.com/v1/namespace-string/bucket_name';

    Where namespace-string is the Oracle Cloud Infrastructure object storage namespace. See Understanding Object Storage Namespaces for more information.

  3. Create a credential for your Oracle Cloud Infrastructure Object Storage account using DBMS_CLOUD.CREATE_CREDENTIAL.

    Note that you need to run this command as the ADMIN user. For example:

    BEGIN
      DBMS_CLOUD.CREATE_CREDENTIAL(
        credential_name => 'DEF_CRED_NAME',
        username => 'adb_user@example.com', 
        password => 'Auth_Token'
    );
    END;
    /

    See CREATE_CREDENTIAL Procedure for details on the arguments for username and password.

  4. Set the database property DEFAULT_CREDENTIAL to the credential you created in the previous step. For example:
    ALTER DATABASE PROPERTY SET DEFAULT_CREDENTIAL = 'ADMIN.DEF_CRED_NAME';

Use the following command to show the value for DEFAULT_BACKUP_BUCKET:

SELECT PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME='DEFAULT_BACKUP_BUCKET';

See Manual Backup Notes for more information.

Perform Manual Backups on Autonomous Database

In addition to automatic backups, Autonomous Database also allows you take manual backups and store the backups to Oracle Cloud Infrastructure Object Storage.

Perform the following prerequisite steps as necessary:

  • Open the Oracle Cloud Infrastructure console by clicking the navigation icon next to Oracle Cloud.

  • From the Oracle Cloud Infrastructure left navigation list click either Autonomous Data Warehouse, Autonomous Transaction Processing, or Autonomous JSON Database depending on the workload type of your Autonomous Database.
  • On the Autonomous Databases page select an Autonomous Database from the links under the Display Name column.

  1. On the Autonomous Database Details page, under Resources, click Backups.
  2. On the Autonomous Database Details page, under Backups, click Create Manual Backup.
  3. If you previously configured your database for manual backups, continue to Step 4.

    The system checks and shows a dialog box if the database is not configured for manual backups. In this case, to perform a manual backup click Close and configure your database for manual backups. See Configure Manual Backups on Autonomous Database for more information.

  4. In the Create Manual Backup dialog box enter a name in the Display Name field.
  5. In the Create Manual Backup dialog box click Create Manual Backup.

See Manual Backup Notes for more information.

Manual Backup Notes

Provides notes for manual backups and for manual backup configuration.

Notes for manual backup configuration:

  • If you previously configured manual backups using the DEFAULT_BUCKET property, you do not need to make any changes to perform manual backups with your existing configuration. In this case, the DEFAULT_BUCKET property 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 DEFAULT_BACKUP_BUCKET database property. See Configure Manual Backups on Autonomous Database for more information.

  • If you previously configured Autonomous Database to use manual backups using the DEFAULT_BUCKET property and created backups, then after configuring the DEFAULT_BACKUP_BUCKET property 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_BUCKET property 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.

Notes for manual backups:

  • 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.