wr0ngway/rubber — pull request #132 by akremer (2012-02-17 22:19:29+00:00)
Title: Xtrabackup Template

Xtrabackup template for Rubber. When vulcanized, this will replace itself as the default backup strategy for MySQL and Percona templates. It supports both full and incremental backups (easily switched on with a simple flag). No matter the mode of backup, each backup set is fully "prepared" (in xtrabackup parlance) to allow an immediate restore via the restore util command.

Also amended lib/rubber/commands/util.rb to allow the backupdb command to take an optional -f (filename) flag. This is because the default way of naming backups isn't correct anymore for Xtrabackup since all backups are tar'd and then gzipped. Since it's optional, the committed implementation doesn't use this flag since I didn't want to edit the crontab's anyone would already have in place.

--

Eventually I'd like to move a lot of this logic from the shell scripts into Rubber. What do you guys think of creating backup strategies just like the DNS strategies? It would require a lot of re-plumbing of existing stuff so I didn't want to go down that rabbit hole if this kind of stuff is preferable.