Skip to content

Reduce the RDS MS SQL Storage post data archival

0

Hi Team, I have a RDS MS SQL database with 12 TB storage. I am going to archive the old data of about 4 TB.
What is the best way to reduce the RDS storage post data archival?

Thanks for you response.

AWS

asked 2 years ago261 views

2 Answers
0

After archiving 4 TB of old data from your RDS MS SQL database, you have a few options to reduce the RDS storage:

  1. Blue/Green Deployment: This is the recommended and safest method for reducing storage. Create a new RDS instance (Green) with a smaller storage size, keeping it in sync with your current instance (Blue). Once synchronized, promote the Green instance to become the new production database. This method ensures minimal downtime and no data loss.

  2. Manual Migration: Create a new RDS instance with lower allocated storage, manually migrate the remaining data from your current database to this new instance, and then switch your database endpoints to the new instance.

  3. Optimize Current Instance: While you can't directly reduce allocated storage, you can optimize your current instance by:

    • Running VACUUM (for PostgreSQL) or OPTIMIZE TABLE (for MySQL) to reclaim space within the database files.
    • Removing unused or duplicate indexes.
    • Dropping unnecessary temporary tables.
    • Reducing logging levels during non-debug periods.
  4. Backup Retention: Reduce your backup retention period to the minimum required for your compliance needs. This can help decrease the overall storage usage, as backups contribute to your total storage consumption.

  5. Regular Maintenance: Implement a routine to archive data to S3 and optimize your database regularly to prevent future over-allocation of storage.

Remember that Amazon RDS doesn't allow direct downsizing of storage. The methods above are workarounds to effectively reduce your storage footprint. Always ensure you have recent backups before making significant changes to your database infrastructure.

Sources
Shrink storage volumes for your RDS databases and optimize your infrastructure costs | AWS Database Blog
AWS RDS MS SQL Data archiving approaches | AWS re:Post
Managing capacity automatically with Amazon RDS storage autoscaling - Amazon Relational Database Service

answered 2 years ago

  • Blue/Green Deployment is not supported for RDS MS SQL as of now.

0

Hello.

As of March 2025, it is not possible to reduce the storage size of an RDS instance that is already running, so you will need to move the data to a new RDS instance using AWS DMS or a database dump, as described in the following document.
https://repost.aws/knowledge-center/rds-db-storage-size

EXPERT

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.