MySQL Forums
Forum List  »  MySQL & Kubernetes

MySQL InnoDB backup using flush tables
Posted by: GURU PRASHANTH THANAKODI
Date: March 04, 2024 08:34AM

Hi All

I am trying to design a backup strategy to backup the files of MySQL using storage snapshot. It primarily has InnoDB engine files.It's mentioned in the MySQL blog that the "flush command with read lock" will flush the table contents to disk for InnoDB but keep the table open. It blocks the write queries for the innodb tables. I see the same is repeatedly mentioned in the steps to setup replication blog as well. Though same lock command is executed, it is recommending to shutdown the server if innodb files are available.

What could be writing to innodb files even when the write queries are blocked and make the data inconsistent?


1. https://dev.mysql.com/doc/refman/8.0/en/flush.html

Snippet from above article

"The descriptions here that indicate tables are flushed by closing them apply differently for InnoDB, which flushes table contents to disk but leaves them open. This still permits table files to be copied while the tables are open, as long as other activity does not modify them. "



2. https://dev.mysql.com/doc/refman/8.0/en/replication-snapshot-method.html

Snippet from above article

If you are using InnoDB tables, and also to get the most consistent results with a raw data snapshot, shut down the source server during the process, as follows:

Thanks
Guru

Options: ReplyQuote


Subject
Written By
Posted
MySQL InnoDB backup using flush tables
March 04, 2024 08:34AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.