How to backup MySQL (mysqldump) when Memcached installed?

Posted by cewebugil on Server Fault See other posts from Server Fault or by cewebugil
Published on 2011-03-05T14:44:16Z Indexed on 2011/03/05 15:26 UTC
Read the original article Hit count: 232

Filed under:
|
|
|

The server OS is CentOS, with Memcached installed

Before Memcached installed, I use

mysqldump -u root -p --lock-tables --add-locks --disable-keys --skip-extended-insert --quick wcraze > /var/backup/backup.sql

But now, Memcached has been installed.

According to Wikipedia;

When the table is full, subsequent inserts cause older data to be purged in least recently used (LRU) order.

This means new data entry is not directly saved in MySQL, but saved in Memcached instead, until limit_maxbytes is full, the least accessed data will be saved in MySQL.

This means, some data is not in the MySQL but in Memcached. So, when backup, the new entry is not in the backup data

What is the right way to backup?

© Server Fault or respective owner

Related posts about mysql

Related posts about backup