Backup MySQL Amazon RDS

后端 未结 6 1988
遇见更好的自我
遇见更好的自我 2021-02-01 06:16

I am trying to setup Replica outside of AWS and master is running at AWS RDS. And I do not want any downtime at my master. So I setup my slave node and now I want to backup my c

6条回答
  •  离开以前
    2021-02-01 06:27

    I had faced a similar problem a quick workaround to this is:

    1. Create a EBS Volume to have an extra space or extend current EBS volume on EC2. (or if you have an extra space you can use that).

    2. Use mysqldump command without --master-data or --flush-data directive to generate a complete (FULL) backup of db.

      mysqldump -h hostname --routines -uadmin -p12344 test_db > filename.sql

    admin is DB name and 12344 is the password

    Above is for taking backup of one single DB, if required to take all DBs then specify --all-databases and also mention DB Names.

    1. Create a Cron of this command to run once a day that will automatically generate the dump.

    Please note that this will incur an extra cost if your DB Size is huge. as it creates a complete DB dump.

    hope this helps

提交回复
热议问题