Page 1 of 1

How to restore on clustered servers

PostPosted: Sun Jul 09, 2017 5:23 pm
by ichigo
Hi Good Day to all!!!

I back up a single server (all-in-one)
Code: Select all
# perl /usr/share/astguiclient/ADMIN_backup.pl --debugX

----- DEBUG -----


----- SUPER DEBUG -----


----- Mysql dump -----

DBX-  starting to backup database 0: asterisk
/usr/bin/mysqldump --user=cron --password=xxxx --lock-tables --flush-logs asterisk | /usr/bin/gzip > /              var/log/astguiclient/archive/temp/XXX.XX.XX.XXXasterisk0.gz
/bin/tar cf /var/log/astguiclient/archive/temp/XXX.XX.XX.XXX_CONF_0.tar /etc/astguiclient.conf  /etc/d              ahdi /etc/asterisk
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/XXX.XX.XX.XXX_LINUX_0.tar /etc/my.cnf /etc/crontab_snap              shot /etc/hosts /etc/resolv.conf
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/XXX.XX.XX.XXX_WEB_0.tar /srv/www/htdocs
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/XXX.XX.XX.XXX_BIN_0.tar /var/lib/asterisk/agi-bin /usr/              share/astguiclient
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/XXX.XX.XX.XXX_SOUNDS_0.tar /var/lib/asterisk/sounds
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/XXX.XX.XX.XXX_VOICEMAIL_0.tar /var/spool/asterisk/voice              mail
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/XXX.XX.XX.XXX_ALL_0.tar /var/log/astguiclient/archive/temp
/bin/tar: Removing leading `/' from member names
rm -f /var/log/astguiclient/archive/XXX.XX.XX.XXX_ALL_0.tar.gz
/usr/bin/gzip -9 /var/log/astguiclient/archive/XXX.XX.XX.XXX_ALL_0.tar
rm -fR /var/log/astguiclient/archive/temp
script execution time in seconds: 32     minutes: 0.533333333333333
DONE, Exiting...


How can I restore this to a cluster servers?

Thank you in advance.

Re: How to restore on clustered servers

PostPosted: Sun Jul 09, 2017 7:32 pm
by mflorell
Well, it really depends on how you want your cluster to be set up.

You start by installing VICIbox on all servers, then restore the DB first, then web, then the dialers.

Here's an example of the commands to do a restore:

(you will need to replace "192.168.198.5" in the commands below with the IP of the backed-up server)
- ls -lat /var/log/astguiclient/archive/
- cd /var/log/astguiclient/archive/
- tar xvfz 192.168.198.5_ALL_0.tar.gz
- cd var/log/astguiclient/archive/
- mv 192.168.198.5* /
- cd /
- ls -lat
- tar xvf 192.168.198.5_VOICEMAIL_0.tar
- tar xvf 192.168.198.5_CONF_0.tar
- tar xvf 192.168.198.5_BIN_0.tar
- tar xvf 192.168.198.5_LINUX_0.tar
- tar xvf 192.168.198.5_SOUNDS_0.tar
- (check for other tar files if you used other backup options)
- gunzip 192.168.198.5asterisk0.gz
- mysql asterisk
- \. 192.168.198.3asterisk0
- quit

Re: How to restore on clustered servers

PostPosted: Mon Jul 10, 2017 10:26 am
by ichigo
Thanks Matt,

I will use the restore command to all the servers (DB | Web | Dialers)?

Re: How to restore on clustered servers

PostPosted: Thu Jul 13, 2017 9:51 am
by ichigo
Thanks Matt, i figured it out and i already did restore my backup to my clustered servers, but i have this problem
"WARNING" Code expects different schema: 1458

Re: How to restore on clustered servers

PostPosted: Thu Jul 13, 2017 1:31 pm
by mflorell
Then you should probably upgrade your vicidial code.

Re: How to restore on clustered servers

PostPosted: Thu Jul 13, 2017 6:55 pm
by ichigo
Matt how can i upgrade the vicidial code?

Re: How to restore on clustered servers

PostPosted: Thu Jul 13, 2017 8:56 pm
by mflorell
cd /usr/src/astguiclient/trunk
svn up

READ THE "UPGRADE" DOCUMENT, the instructions for how to upgrade are in there.