Export RDS data to S3/Glacier

蓝咒 提交于 2019-12-24 12:00:46

问题


I want to export data from Oracle RDS to S3 and then move it to Glacier. My end goal is to take the backup of the data stored in RDS to S3 and Glacier to meet compliance requirements. Could anyone please suggest the best approach to achieve it.


回答1:


RDS snapshots are stored in s3, but you are not able to download them or set policies on them that would back them up to glacier.

So, you will have to do this manually. Set up an instance with enough disk space to store a dump of your database. Write a script that connects to your RDS instance (preferably some kind of replica, instead of master) and dumps all the data. Compress it, and then upload it to your backup bucket in s3.

You can set a lifecycle policy s3 bucket which will then store the backup within glacier. If the object is set to glacier storage, it wont be available immediately for download.




回答2:


You can copy data between S3 buckets using AWS API. If you have access to a bucket with RDS backups use this thread to copy it to new S3 bucket with policies.




回答3:


With AWS Data Pipeline you can copy data (rows) from a table in RDS (not sure about Oracle, need to check) to a CSV (comma-separated values) file in an Amazon S3 bucket. Then by enabling lifecycle policy on your S3 bucket you can move these files to Glacier.




回答4:


To export data from Oracle RDS - use the Oracle Expdp functionality. This creates the datafile export on the server under the DATAPUMP directory. The file can then be moved to the logs directory and downloaded from the console(AWS RDS Console) - bigger files can be broken into multiple files during export.

Once on local(can be a cloud server) upload to S3 and or Glacier as needed.



来源:https://stackoverflow.com/questions/34482577/export-rds-data-to-s3-glacier

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!