Page 1 of 1

Realtime database backup to another server

PostPosted: Thu Jan 24, 2019 5:34 am
by maxhbp204
Hi,
We have vicidial 2.14 installed on quad core server with 32 gb ram.
we are using asterisk 11 for this current version,
we have another server which is just having database and gui and no asterisk, we want to make another server as backup server,
we have tried mysql master slave and also tried cluster setup, but it failed, so we want to do realtime mysql database backup from production server to backup server,
anyone has any suggestion which is best method to do realtime backup of mysql?

Re: Realtime database backup to another server

PostPosted: Thu Jan 24, 2019 11:32 pm
by mflorell
MySQL master/slave is the best way to do it, and we have dozens of clients operating that way right now.

Re: Realtime database backup to another server

PostPosted: Tue Jan 29, 2019 5:12 pm
by williamconley
maxhbp204 wrote:we want to make another server as backup server,

Backup as in ... emergency mysql server in case of failure of primary? Or backup as in "store backup files/data" for possible later use?
maxhbp204 wrote:we have tried mysql master slave and also tried cluster setup, but it failed,

Vicidial can not use a mysql cluster for production database, only for reporting. the data is NOT available on all nodes simultaneously and Vicidial will not work without instant data availability (by instant, I mean within a nanosecon! Seriously!). Same with master/slave: Only good for reporting. You can use the setting in admin->System Settings to provide the IP of the mysql slave server that you want to use for reporting, and which reports should use that server.

"It failed" is a bit vague. There are several reasons why a failure would occur. In many situations, it's "version based". If the SLAVE is older than the master, for instance, failure will occur as the master knows commands the slave does not and the slave will then fail. There are also some memory tables that will dump on reboot and cause an error after the system starts back up, those errors must be set to ignore.
maxhbp204 wrote:so we want to do realtime mysql database backup from production server to backup server,

Copying a backup set from one server to another is handled via ftp in the vicidial backup script. Having that pushed "live" into the mysql service of the receiving server would just be another script. But what is the purpose of the backup server? (asked earlier ...). If your goal is "live backup database", that requires changes to the other servers in addition to loading the database: They must all be reset to know the IP of the newly active db server and likely be rebooted so all running scripts are reset to the new IP as well.

Not so much "general discussion" as "support request". Moving to the support board.