Replication - Slave Backup to Master
Hi there I have a question regarding replication. This is the situation: Mysql-Max4.0.16 192.168.0.10 master 192.168.0.11 slave I would like to use the slave as the backup server and use it in case the master goes down for any reason. I'm looking for a safe method to re-update the master when we take it up again. I read that 2-ways replication is dangerous so for peace of mind I would avoid it. I was considering a simple dump of the database on slave, when I have to reconnect the master server. I would: 1. disconnect the slave 2. create a dump file form salve 3. put the dump on the master 4. reconnect the master and slave Questions are.. a. I use innodb tables. Any problems to nofify? b. Are auto_increment values correct/safe after such operations. I guess so but I'm not 100% sure c. Do you have comments and suggestions regarding 2-ways replications Any suggestion / comment is welcome ;) Thanks!! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Replication - Slave Backup to Master
Hi thanks a lot for your prompt reply. The second email went out on accident - apologies. I managed to fix it - I found localhost; EcolMod1 in user.myd. Thanks again, Rainer On 13 Nov 2003 at 10:41, nm wrote: Hi there I have a question regarding replication. This is the situation: Mysql-Max4.0.16 192.168.0.10 master 192.168.0.11 slave I would like to use the slave as the backup server and use it in case the master goes down for any reason. I'm looking for a safe method to re-update the master when we take it up again. I read that 2-ways replication is dangerous so for peace of mind I would avoid it. I was considering a simple dump of the database on slave, when I have to reconnect the master server. I would: 1. disconnect the slave 2. create a dump file form salve 3. put the dump on the master 4. reconnect the master and slave Questions are.. a. I use innodb tables. Any problems to nofify? b. Are auto_increment values correct/safe after such operations. I guess so but I'm not 100% sure c. Do you have comments and suggestions regarding 2-ways replications Any suggestion / comment is welcome ;) Thanks!! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland 7602 South Africa Tel: +27 - (0)21 882 8862 Fax: +27 - (0)21 808 3304 Cell: +27 - (0)83 9479 042 email: [EMAIL PROTECTED] [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Replication - Slave Backup to Master
On Thursday 13 November 2003 10.41, nm wrote: Hi there I have a question regarding replication. This is the situation: Mysql-Max4.0.16 192.168.0.10 master 192.168.0.11 slave I would like to use the slave as the backup server and use it in case the master goes down for any reason. I'm looking for a safe method to re-update the master when we take it up again. You need a way to resume operation in case your master dies, correct? I was considering a simple dump of the database on slave, when I have to reconnect the master server. You should regularly do backups from your slave. Sounds like you're a slave short, what if your master burns up in flames while you are doing the dump from your slave? I would: 1. disconnect the slave Since the master just went down your slave would already be disconnected. 2. create a dump file form salve Consider which of your hosts have the most correct data after a crash. 3. put the dump on the master Put an exact copy of the dump on all nodes (master(s) and slave(s)) 4. reconnect the master and slave also clear the master bin-logs from the master, and the index files. do the same for the slaves: clear out following files from your new slave(s): master.info all relay-log files (index, *.bin) This way the master will start at bin-log 001 at position 4. And the slave(s) will start reading from the 'first' position from the master. I know, position 4 == first looks weird but that's just the way it is. Questions are.. a. I use innodb tables. Any problems to nofify? I have so far recovered ok with innodb tables, anyone else are welcome to comment. b. Are auto_increment values correct/safe after such operations. I guess so but I'm not 100% sure if you start over with the exact same snapshot on all nodes you should be ok. c. Do you have comments and suggestions regarding 2-ways replications tricky... as Jeremy Zawodny said in a previous thread: it's a race condition with primary keys etc. http://www.mysql.com/doc/en/Replication_FAQ.html These are just some primary hints, corrections are welcome. Mikael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
FW: Replication - Slave Backup to Master
Hi I set a 2-way replication on 2 servers. I made some test transactions and it is working. I can make the clients go to any of my servers and the replication is done in real time, or so. It looks great. What are the potential problems I could have? Suggestions? Do you have any experience? (using Mysql-Max4.0.16) Thanks!! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]