Working with RDS for Oracle replica backups
You can create and restore backups of an RDS for Oracle replica. Both automatic backups and manual snapshots are supported. For more information, see Backing up, restoring, and exporting data. The following sections describe the key differences between managing backups of a primary and an RDS for Oracle replica.
Turning on RDS for Oracle replica backups
An Oracle replica doesn't have automated backups turned on by default. You turn on automated backups by setting the backup retention period to a positive nonzero value.
To enable automated backups immediately
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/
. -
In the navigation pane, choose Databases, and then choose the DB instance or Multi-AZ DB cluster that you want to modify.
-
Choose Modify.
-
For Backup retention period, choose a positive nonzero value, for example 3 days.
-
Choose Continue.
-
Choose Apply immediately.
-
Choose Modify DB instance or Modify cluster to save your changes and enable automated backups.
To enable automated backups, use the AWS CLI modify-db-instance
or modify-db-cluster
command.
Include the following parameters:
-
--db-instance-identifier
(or--db-cluster-identifier
for a Multi-AZ DB cluster) -
--backup-retention-period
-
--apply-immediately
or--no-apply-immediately
In the following example, we enable automated backups by setting the backup retention period to three days. The changes are applied immediately.
For Linux, macOS, or Unix:
aws rds modify-db-instance \ --db-instance-identifier
mydbinstance
\ --backup-retention-period3
\--apply-immediately
For Windows:
aws rds modify-db-instance ^ --db-instance-identifier
mydbinstance
^ --backup-retention-period3
^--apply-immediately
To enable automated backups, use the RDS API ModifyDBInstance
or ModifyDBCluster
operation with the following required
parameters:
-
DBInstanceIdentifier
orDBClusterIdentifier
-
BackupRetentionPeriod
Restoring an RDS for Oracle replica backup
You can restore an Oracle replica backup just as you can restore a backup of the primary instance. For more information, see the following:
The main consideration when you restore a replica backup is determining the point in time to which you are restoring. The database time refers to the latest applied transaction time of the data in the backup. When you restore a replica backup, you restore to the database time, not the time when the backup completed. The difference is significant because an RDS for Oracle replica can lag behind the primary by minutes or hours. Thus, the database time of a replica backup, and thus the point in time to which you restore it, might be much earlier than the backup creation time.
To find the difference between database time and creation time, use the describe-db-snapshots
command. Compare the
SnapshotDatabaseTime
, which is the database time of the replica backup, and the OriginalSnapshotCreateTime
field, which is the latest applied transaction on the primary database. The following example shows the difference between the two
times:
aws rds describe-db-snapshots \ --db-instance-identifier my-oracle-replica --db-snapshot-identifier my-replica-snapshot { "DBSnapshots": [ { "DBSnapshotIdentifier": "my-replica-snapshot", "DBInstanceIdentifier": "my-oracle-replica", "SnapshotDatabaseTime": "2022-07-26T17:49:44Z", ... "OriginalSnapshotCreateTime": "2021-07-26T19:49:44Z" } ] }