Tuesday, 6 August 2013

Is it safe to lock tables on a mysql replica slave?

Is it safe to lock tables on a mysql replica slave?

I have a master mysql database where the application writes and read
production data, and then I setup a slave database just in case something
goes wrong with the master database server (and I can do a quick switch).
On the slave database, I run reports.
I have to create daily backups for the database, I was thinking on
creating them on the slave database, so the production environment can
continue working without any delay, and now I have the option to lock or
not the slave tables.
Is it safe to lock the tables to perform the backup (which could take like
30 minutes) and once the backup is done, mysql does automatically sync the
slave database with the updates performed on the master database when the
tables were locked?

No comments:

Post a Comment