Promote slave server to master if master crashes

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Promote slave server to master if master crashes

Postby rustynail » Wed Jan 13, 2021 8:16 pm

Hi,

- ViciBox v.7.0.4-170113

Master DB server of our cluster has crashed and I have did following to promote slave server to master role:

0. Stopped slave on slave server.
1. Edited astguiclient.conf and changed VARDB_server to localhost
2. Changed VARactive_keepalives to 123456789E
3. On other servers changed VARDB_server to point to slave server

This is first time I am promoting slave to master role. I have checked agent login is fine and will further test but want to make sure if the above steps I took are fine or there is something I am missing? For example I have used "stop slave" to stop slave on this server but after reboot what will happen and how to stop slave permanently on this server?

Please let me know if any further steps need to be taken as this cluster is in production.

Thanks
rustynail
 
Posts: 55
Joined: Mon Nov 21, 2016 6:21 pm

Re: Promote slave server to master if master crashes

Postby carpenox » Thu Jan 14, 2021 8:28 am

I would imagine you need an answer pretty fast so i will reply, but i have never done this myself so this is just in theory as you wait for other responses, Bill or Matt would be the people I would listen to for that answer, but in the meantime, I would backup the database on the main db server if you can because i am not sure if the slave copies all reports and then import that into the slave as a final step but other that it looks good to me
ViciBox v9.0.3 | Version: 2.14-783a | BUILD: 210103-0856 | SVN Version: 3343 | DB Schema Version: 1615 | Asterisk 13.38.0
http://www.CyburityLLC.com -:- 844-PC-SATA-2 -:- www.contactcentersRus.com -:- Whatsapp: +19549477572 -:- Skype: live:carpenox_3
carpenox
 
Posts: 911
Joined: Wed Apr 08, 2020 2:02 am
Location: Coral Springs, FL

Re: Promote slave server to master if master crashes

Postby mflorell » Thu Jan 14, 2021 9:23 am

We usually just change the IP address of the slave to the master, disable slave mirroring on the slave and reboot the slave while also shutting down the master to analyze off-line.

Once the old master is fixed or replaced, you do a dump of the DB from the current acting master and reverse the process above.

Of course it's different for every kind of DB setup. We have clients with multiple slave DB servers that require a bit more configuration changes for the switchover, and we have some clients that have all of these steps automated as well.
mflorell
Site Admin
 
Posts: 17625
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 53 guests