AWS Database Blog

Best practices for upgrading Amazon RDS for Oracle database snapshots

Amazon Relational Database Service (Amazon RDS) for Oracle provides the option to take manual DB snapshots of your databases. These DB snapshots may have to be retained for regulatory purposes or just as backups taken before any major database or application activities like upgrades or releases. When you create a DB snapshot, the snapshot is based on the engine version used by your Amazon RDS instance. In addition to upgrading the DB engine version of your DB instance, Amazon RDS recommends upgrading the engine version for your DB snapshots to keep them on supported DB engine versions. If you have an existing manual DB snapshot on a deprecated engine version, you can upgrade it to a later version of the Oracle database engine.

In this post, we provide step-by-step instructions to upgrade an RDS for Oracle deprecated DB snapshot to a supported engine version. We go through three common snapshot upgrade use cases and discuss important points to consider while performing a snapshot upgrade.

You can’t upgrade a snapshot and downgrade the minor version. For example, you can’t upgrade a snapshot from 11.2.0.4 October 2020 PSU to the 19c July 2020 rur, but you can upgrade to 19c October 2020 rur. To learn more about supported snapshot upgrade paths, see Upgrading an Oracle DB snapshot.

End of support timeline for Amazon RDS for Oracle manual snapshots

Amazon encourages you to upgrade your deprecated snapshots in a timely manner to stay on supported versions and to be able to utilize the snapshots when needed. For more information about RDS for Oracle snapshot deprecation timelines, see the forum post.

Considerations for snapshot upgrades

When performing a snapshot upgrade, consider the following:

  • Amazon RDS supports upgrading snapshots in all AWS Regions.
  • Amazon RDS for Oracle supports snapshot upgrades of only manual or user snapshots. Automatic snapshots don’t get upgraded. However, you can always copy an automatic snapshot to be a manual one and then upgrade. If a database upgrade for example isn’t successful, the existing automated snapshots are your rollback strategy.
  • Amazon RDS for Oracle only supports upgrades on deprecated versions of snapshots.
  • For some older versions, you have to do a two-step upgrade process to get to the latest version. For example, to upgrade a 11.2.0.3 snapshot to 19c, you have to first perform a snapshot upgrade from 11.2.0.3 to 11.2.0.4.v11, and then upgrade from 11.2.0.4 to 19.0.0.0.ru-2020-10.rur-2020-10.r1. Refer to Upgrading an Oracle DB snapshot for the supported snapshot upgrade paths.
  • Amazon RDS for Oracle doesn’t support copying deprecated DB snapshots to a different Region. For cross-Region DB snapshot upgrades, first upgrade the deprecated DB snapshot in the source Region, then copy the upgraded snapshot to the destination Region.
  • For encrypted snapshots, if you want to change the encryption key, first make a copy of the snapshot. While you’re making a copy, choose the new AWS Key Management Service (AWS KMS) key, then upgrade the snapshot copy.
  • You can specify option groups when you upgrade an RDS for Oracle DB snapshot. The same option group considerations apply when upgrading a DB snapshot as when upgrading a DB instance. For more information, see Option group considerations.
  • Shared or public snapshots can’t be upgraded using modify-db-snapshot. To upgrade a shared snapshot, make a copy of the snapshot to the local account and then perform an upgrade.
  • We highly recommend upgrading the manual snapshots you intend to retain longer, including the snapshots taken using AWS Backup or any third-party partner products. For example, say you have a snapshot backup taken using AWS Backup and the snapshot version is now deprecated. When this snapshot backup is restored, the first thing Amazon RDS does is force upgrade it to one of the supported versions and then complete the restore. If you want to keep it as a copy of the old version (for example, if the database is supporting an old version of a third-party application) you should make a backup using native Oracle tools such as export data pump or RMAN. Also keep the version incompatibilities in mind. Refer to My Oracle Support article 553337.1 for data pump and article 73431.1 for RMAN Compatibility Matrix. For License Included customers, create a support case for this document.

Solution overview

Amazon RDS for Oracle supports upgrading DB snapshots taken from Standard Edition and Enterprise Edition databases. You can perform snapshot upgrades in Amazon RDS for Oracle via the AWS Management Console or the AWS Command Line Interface (AWS CLI) and the SDK. In the following sections, we demonstrate how to perform snapshot upgrades using the AWS CLI (modify-db-snapshot) in three different use cases.

At the time of this writing, we’re working on improving our console; as a result, some features may be unavailable. If you encounter issues using the console, try the AWS CLI to perform the upgrades until the console is fully improved.

Prerequisites

Make sure you have the following prerequisites:

  • An AWS account with the required AWS Identity and Access Management (IAM) privileges to administer Amazon RDS for Oracle instances.
  • Manual snapshots of deprecated versions of Amazon RDS for Oracle
  • Familiarity with the AWS CLI and Amazon RDS for Oracle

Use case 1: Upgrade a 11.2.0.4.v3 snapshot to 19c

upg1-snap2 is a manual snapshot of an RDS for Oracle instance with Oracle Database Enterprise Edition and version 11.2.0.4.v3.

For information about choosing the correct target version PSU, see Upgrading an Oracle DB snapshot.

Upgrade snapshot upg1-snap2 to 19c with the following code:

aws rds modify-db-snapshot ^
--db-snapshot-identifier upg1-snap2 ^
--engine-version 19.0.0.0.ru-2020-07.rur-2020-07.r1 ^
--option-group-name default:oracle-ee-19

The following screenshot shows the snapshot status on the console.

The snapshot status changes to Available when the upgrade is complete.

You can also view this using the describe-db-snapshots API:

aws rds describe-db-snapshots ^
--db-snapshot-identifier upg1-snap2

With this method, you can use modify-db-snapshot to upgrade a manual DB snapshot from 11.2.0.4 to 19c and keep the snapshot on a supported version.

Use case 2: Upgrade a 18c snapshot to 19c

upg2-snap2 is a manual snapshot of an RDS for Oracle instance with Oracle Database Enterprise Edition and version 18.0.0.0.ru-2021-04.rur-2021-04.r1.

For information about choosing the correct target version PSU, see Upgrading an Oracle DB snapshot.

Upgrade snapshot upg2-snap2 to 19c with the following code:

aws rds modify-db-snapshot ^
--db-snapshot-identifier upg2-snap2 ^
--engine-version 19.0.0.0.ru-2021-04.rur-2021-04.r1 ^
--option-group-name default:oracle-ee-19

This demonstrates upgrading an 18c DB snapshot to 19c using the modify-db-snapshot command.

Use case 3: Cross-Region copy of deprecated DB snapshots

upg1-snap4 is a manual DB snapshot in us-east-1 with DB engine version 11.2.0.4v3. It’s encrypted using the default KMS key.

Upgrade the DB snapshot upg1-snap4 in the source Region (us-east-1) to 19c using modify-db-snapshot:

aws rds modify-db-snapshot ^
    --db-snapshot-identifier upg1-snap4 ^
    --engine-version 19.0.0.0.ru-2020-07.rur-2020-07.r1 ^
    --option-group-name default:oracle-ee-19

After the upgrade, upg1-snap4 is now a 19c DB snapshot, as shown in the following screenshot.

Now we create a copy of this snapshot and call it upg1-Xsnap in us-east-2, and choose the destination Region KMS key.

After the copy is complete, you can access this DB snapshot in us-east-2, as shown in the following screenshot.

With this method, to use deprecated DB snapshots across Regions, you have to first upgrade it in the source Region and then copy the upgraded snapshot to the destination Region.

Conclusion

In this post, we reviewed how to perform a snapshot upgrade of a deprecated version of RDS for Oracle DB snapshots and the upgrade choices available. We also covered some of the considerations to keep in mind while performing such an upgrade. This can help you stay on supported versions for your manual DB snapshots so you can restore the snapshots when needed. We hope you found this information useful; please leave your thoughts in the comments.


About the Authors

Yamuna Palasamudram is a Senior Database Specialist Solutions Architect with Amazon Web Services. She works with AWS RDS team, focusing on commercial database engines like Oracle. She enjoys working with customers to help design, deploy, and optimize relational database workloads on AWS.

 

 

Sundar Raghavan is a Senior Database Specialist Solutions Architect at Amazon Web Services (AWS) with a focus on relational databases. Prior to AWS, Sundar has worked as an Enterprise Solution Architect and professional consultant in the Midwest area for large enterprises in manufacturing and finance verticals. Prior to joining AWS, Sundar worked at Oracle, Cloudera/Horton Works as an architect specializing in database and data platforms. Outside of work, he is passionate about books, movies, playing chess and outdoor activities.

 

Vejey Gandier is a Product Manager Technical with Amazon Web Services. He works in Amazon Relational Database Service (Amazon RDS) for Oracle team. He helps the team in feature launches, product strategy, product roadmap and influence customers modernize the Oracle databases and move to managed databases on AWS.