John Miller
John Miller

Reputation: 513

How to export AWS RDS snapshot to your own S3 bucket?

I am using a SQL Server Express AWS RDS instance. The RDS is backing up daily.

I've found that the RDS snapshot is actually stored in S3. But is it possible to export data to your own S3 bucket?

Upvotes: 4

Views: 27050

Answers (4)

dz902
dz902

Reputation: 5828

For Googlers:

As of 11/09/2020, there is no way to access RDS snapshots directly, nor to export them to S3.

The catch: you may export snapshot _data_ to S3, but NOT the snapshot itself.

The snapshot _data_ is provided in Parquet format thus is there for you to do analysis with Athena, etc. only.

For DR purposes, you may copy snapshots to a second region, or share snapshots to other accounts.

THE ABOVE IS FREQUENTLY SEEN IN CERTIFICATION EXAM.

Although for very-long backups, you may use the export-to-s3 features as officially recommended.

Upvotes: 1

shivMagus
shivMagus

Reputation: 315

RDS now provides the functionality to snapshot data into S3 bucket. Functionality provides full db backup or selective schema/table backups. Backups are stored into S3 bucket in Parquet Format.

https://aws.amazon.com/about-aws/whats-new/2020/01/announcing-amazon-relational-database-service-snapshot-export-to-s3/

You can also automate it using lambda based on following sample -- https://github.com/aws-samples/rds-snapshot-export-to-s3-pipeline

**Update -- ** Currently, This functionality is not intended for data backup/restore purposes. Please see Jim's comment below.

Upvotes: 0

cjwfuller
cjwfuller

Reputation: 450

Snapshots are stored in S3 but AWS do not make them visible. Similar question/answer in AWS forums: https://forums.aws.amazon.com/message.jspa?messageID=560995. You will need to do a database dump. https://msdn.microsoft.com/en-us/library/ms187510.aspx looks like a good guide on how to do this.

Update 3rd Feb: AWS now allows you to access the s3 snapshot, you can either download and use it elsewhere or use directly using athena or redshift

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_ExportSnapshot.html

Upvotes: 4

Mark B
Mark B

Reputation: 200562

You can't do this using snapshots. You would have to export the data using something like mysqldump or the equivalent for your database.

Upvotes: 2

Related Questions