Page 1 of 1

what to consider before restoring database

PostPosted: Tue Feb 18, 2014 8:31 am
by richardroi
What are the things need to consider before restoring database on a different server. I lost the cd i used on my running server now.

ViciBox v.5.0.2-130807 | BUILD: 130809-1410 | SVN Version: 2019 | Asterisk: 1.8.23-vici (running server)

Can I run restore it with this version? This is the only oldest copy that I have. If not, what is the best way to do restore? any advice will be highly appreciated.

ViciBox v.5.0.2-130821 | BUILD: 140214-1643 | SVN Version: 2075 | Asterisk 1.8.23-vici (test server)

Thank you.

Re: what to consider before restoring database

PostPosted: Tue Feb 18, 2014 11:47 am
by williamconley
The only consideration is whether the DB matches the rest of the scripts in the system. So you'll want to find the DBSchema in the restored DB, and then upgrade it to match the rest of the scripts installed (via the upgrade instructions, only you can ignore everything except DB upgrade while doing it!)

Re: what to consider before restoring database

PostPosted: Tue Feb 18, 2014 11:59 am
by richardroi
Thank you Sir William!

The running server:
SVN Version: 2016
DB Schema Version:1355

The test server:
SVN Version: 2075
DB Schema Version: 1369

No how to's? btw this is all in one server. want to run the backup script and restore it on the test server.
Thank you.

Re: what to consider before restoring database

PostPosted: Tue Feb 18, 2014 12:05 pm
by williamconley
Vicicial upgrade is a howto on the vicidial wiki. Remember, though: no downgrade available. Once you've upgraded the DB you cannot put it back on the old server unless you upgrade the old server.

Re: what to consider before restoring database

PostPosted: Tue Feb 18, 2014 1:35 pm
by richardroi
Just to make it clear, I need to update the DB of my running server or both of them?
Don't want to mess up. Don't want to loose my Job!
And how to restore if ever I made it to that point?

Thank you.

Re: what to consider before restoring database

PostPosted: Tue Feb 18, 2014 6:35 pm
by williamconley
No changes to the running server. Ever. Don't touch it. Just run the backup script http://www.vicidial.org/VICIDIALforum/viewtopic.php?f=4&t=32420#p109787 and then we'll work on getting that file to the new server.

One step at a time. :)

Note that the backup script will store the backup file to /var/log/astguiclient/archive

If you give it proper ftp credentials and activate the ftp option, it will also send a copy of the backup file to the ftp server. IF the ftp server also happens to be the server you want to restore the DB onto ... well that would be very handy if it happened automatically every night, would it not? For that to work, the receiving server must have ftp. Kumba has convieniently created an "archive server" role for Vicibox that will allow you to activate the ftp service on any Vicibox server. For the documentation on this, I believe you need the PDF or other documentation for Vicibox (not to be confused with Vicidial ... Vicidial is the dialer software, Vicibox is the INSTALLER).