Backing up (MySQL Database) via LVM Snapshot

I have recently come across a nice solution for backing up ("large" MySQL databases without having to handle a slave explicitly for dumps). That is, if a short outage is fine (stopping the slave for a few seconds). We maintain a hot swap slave (read-only) which will jump in for the master if it fails. So such a short outage is fine on the slave.

The solution is as follows:

  • stop MySQL slave
  • perform a filesystem sync
  • perform a LVM snapshot
  • mount the snapshot somewhere
  • start another MySQL instance based on this snapshot for a happy backup

I thought that this method was pretty nice. I did not work out the details yet. But I thought this was a nice idea and it seems to work according to a colleague.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply