- Newest
- Most votes
- Most comments
You're correct that Amazon RDS and Aurora don't provide a direct rollback mechanism for minor version upgrades or OS patching. Once you upgrade from a version like PostgreSQL 16.6 to 16.9, there is no built-in way to revert to the previous version.
When you perform a minor version upgrade, Amazon RDS automatically takes a snapshot before the upgrade. However, this snapshot can only be used to restore a new instance at the same version that was backed up (16.6 in your example). You cannot use this snapshot to downgrade an already upgraded instance back to the previous version.
If you need a rollback strategy for your database upgrades, there are several approaches you can consider:
-
Blue/Green Deployments: Create a separate "green" environment for the upgrade while keeping your original "blue" environment. After testing the upgraded environment, you can switch traffic to it. If issues arise, you can switch back to the original environment.
-
Logical Replication: Set up logical replication from your upgraded database back to a clone of your original version. While MySQL doesn't officially support down-level replication (from newer to older versions), it may work in some cases but requires thorough testing.
-
Clone and Upgrade: Instead of upgrading your production instance directly, create a clone, perform the upgrade on the clone, and test thoroughly before switching traffic.
-
Snapshot Restoration: Take a manual snapshot before upgrading. If issues occur, you can restore from this snapshot to create a new instance at the original version, but you would lose any data changes made after the upgrade.
For critical production environments, it's recommended to thoroughly test minor version upgrades in a non-production environment that closely mimics your production setup before applying them to production. This helps identify potential issues before they impact your production workload.
Sources
Oracle AWS RDS - Fallback Method after Minor Update | AWS re:Post
AWS RDS Aurora Mysql Minor Version Upgrade Recommendation | AWS re:Post
A lot of postgres versions suddenly deprecated | AWS re:Post
Implement a rollback strategy for Amazon Aurora PostgreSQL upgrades using Amazon RDS Blue/Green deployments | AWS Database Blog
Perform minor/major version upgrades for Amazon Aurora MySQL Global Database with minimum downtime | AWS Database Blog
answered a year ago
Hi OldMan
There is no direct, automated rollback option for Aurora or RDS after a minor version upgrade or OS patch, even when restoring from a manual snapshot. Mitigation strategies include thorough testing in staging, Blue/Green deployments, creating new instances with the desired version (if available), and logical replication.
Restore Process When restoring from a snapshot:
A new DB instance is provisioned. Data from the snapshot is copied to the new instance. The current database engine version and OS patch level are applied. This means the restored instance will likely run the latest compatible version, not the older version you want to revert to.
Outline Mitigation Strategies Since direct rollback isn't available, the following strategies can be used:
Thorough Testing in a Staging Environment: Test upgrades in a staging environment that mirrors production before applying them to production. Blue/Green Deployments: Set up a parallel environment with the new version, test, and switch traffic. If issues arise, switch back to the original environment. Create a New Instance with the Desired Version (If Possible): Create a new instance and explicitly specify the older minor version (if available). Migrate data to it. Logical Replication (for MySQL/PostgreSQL): Set up logical replication to a replica running the older version before upgrading. Promote the replica if a rollback is needed. AWS Support (Limited Cases): Engage AWS Support for severe, blocking issues, but don't rely on this as a standard rollback procedure.
If the Answer is helpful, please click Accept Answer and up-vote, so that it can help others in the community looking for help on similar topics.
answered a year ago
Relevant content
asked 9 months ago
