views:

16

answers:

0

My MySQL database is outgrowing the drive that it is one. I'm on EC2 so I can create snapshots easily. Therefore I propose the following process:

  • prune the log files

  • snapshot

  • restore to a bigger volume at a new mount point

  • stop the server

  • copy the log files

  • swap the drive mount points

  • restart the server -- it should read from the binary log to catch up on resent transactions

  • profit (or at least minimize losses)

This seems like it should work: it should be able to rebuild the database from the log files. This also seems like a lot less work than a solution involving