简体   繁体   English

如何从AWS备份数据到本地计算机?

[英]How to take a backup of data to a local machine from the AWS?

I would like to have a copy of the Database in my local computer from the Amazon AWS RDS. 我想从Amazon AWS RDS获取本地计算机中的数据库副本。 How can I do that? 我怎样才能做到这一点?

You can connect to the instance using any tool that does database dumps for the type of database you are running. 您可以使用任何为您正在运行的数据库类型执行数据库转储的工具连接到实例。 For instance, mysqldump if you are have a MySQL or Aurora database. 例如,如果您有MySQL或Aurora数据库,请使用mysqldump

If the database instance is not accessible to the internet you will need to make the dump from an EC2 instance that is in the correct subnet and security groups to talk to the database, or ssh tunnel through an instance to run mysqldump. 如果Internet无法访问数据库实例,则需要从正确子网和安全组中的EC2实例转储以与数据库通信,或者通过实例ssh隧道运行mysqldump。

Note that RDS is configured by default to take daily snapshots of your database (which are stored in AWS, so you cannot download them), but you can restore from them if anything goes wrong. 请注意,默认情况下,RDS配置为获取数据库的每日快照(存储在AWS中,因此无法下载),但如果出现任何问题,您可以从中恢复。 You can also take a manual snapshot at any time using the AWS web console or the API. 您还可以使用AWS Web控制台或API随时获取手动快照。 You could also launch a new database from a snapshot and connect to it to create your local dump from a snapshot instead of the active database. 您还可以从快照启动新数据库并连接到它以从快照而不是活动数据库创建本地转储。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM