Versioned MySQL Backups with Bazaar
So maybe you have a backup solution in place and running periodically to make sure your databases are safe. At any point in time if the system fails, you’re prepared. But what if, right before a backup, an unruly visitor finds an expolit on your application and wipes out a few tables? Your “backup” is then no longer a backup you can rely on.
How do we fix this? Versioning. While popular source control management systems, such as Subversion, Git, and Bazaar, are normally used for collaborating on code together, they can also be extremely handy with backups.
In this example, we’ll be using Bazaar, but everything can easily be applied to Git or Subversion. Or CVS, but… let’s not go there.
To start, find a directory to store your backup repository. I personally use /root/mysql. Inside that directory, start up your repository:
bzr init



