2

I've seen a lot of people talking about snapshots backup, even I'm reading a book about mysql but nobody explain the code how to make a snapshots backup. This is what the book says:

  1. flush tables with read lock

  2. take a snapshot

  3. unlock tables;

THAT's SO NULL!....

Can someone give me MORE information about the snapshots in MySQL?

RolandoMySQLDBA
185k34 gold badges327 silver badges541 bronze badges
asked May 16, 2012 at 19:18
0

1 Answer 1

2

I have written posts of this nature before

You will find code samples and additional advice on its usage

I shy away from Snapshots as done by LVM if

  • 90%+ Data is InnoDB
  • innodb_file_per_table is disabled
  • All Data Exceeds 200GB
  • Heavy Write, Heavy Read

I wrote about this before : Ibdata usage and Recommendations?

While my personal preference is mysqldumps, if you have a small data volume, LVM snapshots would be just fine. If you are running MySQL 5.0/5.1, I would recommend running

SET GLOBAL innodb_max_dirty_pages_pct = 0;

to flush up to 99% of the InnoDB Buffer Pool before performing a file-system snapshot. Then, set it back to

SET GLOBAL innodb_max_dirty_pages_pct = 90;

This is not required for MySQL 5.5

An in-between solution would be Percona's XtraBackup. Percona XtraBackup is free, open-source, and GPL

answered May 16, 2012 at 19:33
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.