MySQL Forums
Forum List  »  Ruby

Scripting the cutover from slave to master and back?
Posted by: Forrest Aldrich
Date: October 25, 2010 02:40PM

We have an internal process by which we replicate our production data to a remote location (effectively a mirror of our production content). From time to time, we will change that slave to a master and test our code at that location, with the old /var/lib/mysql directory backed up first.

After we're done, the my.cnf is switched back along with the backup of /var/lib/mysql and it resumes replication where it left off.

This method works, but it's manually tedious. I know we can (and probably should) be using another method, but this is what we have to work with now.

My question is if there is some clever way through the Ruby scripting and API to facilitate this. I guess the simple answer would be to write a dumb shell script that just does the manual tasks and then report the result so that non-technical staff can trigger the change. It still doesn't feel right.... and I wanted some objective feedback.

We already use Ruby with Puppet for management and so it makes sense that we might consider this route.


Thanks!

Options: ReplyQuote


Subject
Written By
Posted
Scripting the cutover from slave to master and back?
October 25, 2010 02:40PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.