Page 1 of 1

ViciBox upgrade from 2.8 to 2.12

PostPosted: Sat Aug 15, 2015 1:16 pm
by smontoya
Hi, I need some assistance or guidance in how to accomplish that.

I would like to upgrade our ViciBox installation as the repos are dead and there are a lot of changes.

I downloaded the new version of ViciBox and originally I just attempted to move the DB as it is to the new setup which obviously failed due to the amount of changes on the databases.

The info of the system is the following:
Version: 2.8b0.5
SVN Version: 2015
DB Schema Version: 1355

However after reading the upgrading procedures in the new ViciBox the instructions skip from 2.8 to 2.9. There are instructions to upgrade 2.7 to 2.8, but not 2.8 to 2.9.

The info in it is:
Version: 2.12b0.5
SVN Version: 2368
DB Schema Version: 1427

Thanks!

Re: ViciBox upgrade from 2.8 to 2.12

PostPosted: Sat Aug 15, 2015 1:23 pm
by williamconley
look in /usr/src/astguiclient/trunk/UPGRADE

it explains the method to upgrade the DB to match the new code.

essentially you'll be executing .sql upgrade files against the db, starting wherever your previous version left off. i usually delete all the code before that precise version just to be sure. if you edit the sql upgrade files, you'll see that every command is followed by a db schema version update command. this is how you know where your present version is and where you should start. check your present schema, delete any commands before the code that updates the db schema value to the one you already have. execute everything AFTER that command to bring it up to NOW. Note that there are no Odd numbers in the versions last time i checked. only even ... 2.8, 2.10, 2.12 ...

Happy Hunting! 8-)

Re: ViciBox upgrade from 2.8 to 2.12

PostPosted: Sat Aug 15, 2015 4:42 pm
by bobchaos
I just performed this update myself, there's indeed something weird with the SQL upgrade scripts. There actually is one called 2.9, and that's the first one you need ot run if you're currently using vicidial 2.8. You can then do 2.10 and 2.12, and then you can move on to upgrading the Vicidial scripts and bins.

Re: ViciBox upgrade from 2.8 to 2.12

PostPosted: Sat Aug 15, 2015 6:17 pm
by williamconley
Likely where your problem is. There is no 2.9. You (perhaps) have a non-trunk branch mixed in. Perhaps you should delete the folder and try again.

Code: Select all
:/usr/src/astguiclient/trunk/extras # ll *.sql
-rw-r--r-- 1 root root  45626 Jul 24  2013 151_phones_across_3_servers_with_aliases.sql
-rw-r--r-- 1 root root 143995 Feb 24 09:32 MySQL_AST_CREATE_tables.sql
-rw-r--r-- 1 root root  39215 Jul 24  2013 UK_region_codes.sql
-rw-r--r-- 1 root root   3238 Jul 24  2013 cpd_statuses.sql
-rw-r--r-- 1 root root  25837 Feb 24 09:32 first_server_install.sql
-rw-r--r-- 1 root root  25094 Jul 24  2013 second_server_install.sql
-rw-r--r-- 1 root root  12896 Jul 24  2013 single_channelbank_phones.sql
-rw-r--r-- 1 root root  27089 Jul 24  2013 sip-iax_phones.sql
-rw-r--r-- 1 root root  36607 Jul 24  2013 upgrade_2.0.5.sql
-rw-r--r-- 1 root root   8938 Feb 24 09:32 upgrade_2.10.sql
-rw-r--r-- 1 root root  12046 Aug  3 13:58 upgrade_2.12.sql
-rw-r--r-- 1 root root  30737 Jul 24  2013 upgrade_2.2.0.sql
-rw-r--r-- 1 root root  64007 Jul 24  2013 upgrade_2.4.sql
-rw-r--r-- 1 root root  16020 Jul 24  2013 upgrade_2.6.sql
-rw-r--r-- 1 root root  12555 May 23  2014 upgrade_2.8.sql

Re: ViciBox upgrade from 2.8 to 2.12

PostPosted: Sat Aug 15, 2015 7:49 pm
by bobchaos
Yeah sorry William is right about the file, the 2.9 mention is in the UPGRADE document that states you need to update from 2.7 to 2.9. The SQL file does have the right name. If you want to make sure you don't go wrong, check the schema version that you have against those stated in the sql scripts and run (in order!) every script that shows a higher version than your current one. Can't fail!

Re: ViciBox upgrade from 2.8 to 2.12

PostPosted: Sun Aug 16, 2015 7:23 am
by boybawang
1. backup everything
2. go to your astguiclient source (/usr/src/astguiclient)
3. download latest svn: svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk
4. login to mysql server and use asterisk database: mysql -p -A asterisk
5. execute the 2.8 upgrade first because we are not sure if the 2.8 is an older version: mysql> \. /usr/src/astguiclient/trunk/extras/upgrade_2.8.sql
6. execute the 2.8 to 2.10 upgrade script: mysql> \. /usr/src/astguiclient/trunk/extras/upgrade_2.10.sql
7. execute the 2.10 to 2.12 upgrade script: mysql> \. /usr/src/astguiclient/trunk/extras/upgrade_2.12.sql