Hey all, i'm trying to setup a system in which a slave takes over as master in the case the master dies. we're using innodb w/ databases of about 500 megs, so scp/rsyncing those every night is a pretty daunting task, not to mention we can never be sure that the secondary DB has the most recent data. so, i'm going to setup mysql a mysql slave and have it copy all of the data in that manner.
theres some concerns i have though, of course. when the master dies, the slave throws in a new my.cnf and starts up as a master; thats fine. but what about when the original master comes back up? the secondary/backup database could have had INSERTs to it, so the original master must sync those. my solution is just to have the original master startup as a slave to the new master. eventually, everything will sync up. but when? how do i know, and how can i test this? when it does, id like everything to switch back. perhaps theres not a way via mysql commands/variables to do this.. is there a specific file structure i could test for? like checking file sizes/existence of files in mysql's data/ directory? also, when switching masters, what exactly is required? from searching some archives, it seems like i just need to remove master.info && hostname.index, and then RESET MASTER on the master: 'a' is primary/master 'b' is secondary/slave a goes down, b restarts as a master a comes back up, rm's its master.info && hostname.index files executes "RESET MASTER" on b starts up as a slave to dopey does this sound right? am i going to run into problems are there any other steps that should be added, particularly since we use InnoDB tables? has/is anyone else setting up similar functionality? I noticed linux-ha, but this isnt exactly what im looking for.. anybody have anything more generalized? ill share my results with the list, if i finish it in time.. thanks, -tom --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php