Mysqldump AWS RDS

I want to back up the RDS MYsql database. I am currently running a small instance. I need a procedure to get sqldump, but my question is that RDS freezes when using sqldump, since there are many read / write operations in it. Request for help

+2
source share
2 answers

Recommended RDS backup method: automatic backup and DB snapshots . DB snapshots are basically the same as EBS snapshots, which are stored behind the scenes in S3 but are only available in one region.

+3
source

To answer the exact question: "Does RDS freeze when using sqldump":

If you are looking for a backup to use RDS, I would recommend you use RDS snapshots. In this case, a short-term freezing of the input-output, as a rule, lasts several seconds, occurs in DB Single-AZ instances. The database must be frozen to avoid corruption. If you use an external dump utility such as mysqldump, it locks your tables with read locks before resetting them. Depending on your storage engine, UPDATES (and possibly SELECTS) will be queued until there is a dump, after which it will unblock the tables.

If you are not sure, you can block them yourself.

flush tables with read lock;

and then unlock them as soon as the dump is complete.

unlock tables;

0
source

Source: https://habr.com/ru/post/946933/


All Articles