Page 1 of 3

Vicibox SVN Trunk Upgrade

PostPosted: Tue Feb 15, 2011 8:41 am
by Trying
I have put together the little procedure underneath to upgrade Vicibox to SVN Trunk. The two reasons for putting this together is to ensure I do not make a mistake with my first upgrade and also help newbies. Could you please check if the steps and procedures are 100% correct? Please also change or add whatever is needed.



1. Backup existing system:

1.1 Run this for a 1-server system or server with database on it:
(this may take hours on large system)
/usr/share/astguiclient/ADMIN_backup.pl --debugX

1.2 Run this on dialer/Asterisk-only servers:
(do not run this if you only have one server):
/usr/share/astguiclient/ADMIN_backup.pl --debugX --without-db --without-web

2. Test backup:

Create a new (any name) database on any mysql server, apply the backup data to it, and verify a new lead from TODAY is actually in there.

3. On ALL servers: (Database, web, telephony)

cd /usr/src/astguiclient

Download Vicidial trunk on ALL servers

svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk

4. On ONLY database server:

Going into mysql and executing the upgrade sql file:
mysql (alternatively use mysql -u root -p)
use asterisk
\. /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql
quit

(When you do an update on the Database side by issuing a
"\. /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql" from mysql prompt you also need to 'run':
"\. /usr/src/astguiclient/trunk/extras/upgrade_2.6.sql"

The 2.6 upgrade will add 3 columns to the vicidial_campaigns table " in_group_dial | in_group_dial_select | safe_harbor_audio_field". If you don't do the 2.6 upgrade SQL you will have problems...)

5. On ALL servers: (Database, web, telephony)

cd /usr/src/astguiclient/trunk
perl ./install.pl

Your original settings should still be the same so you really just have to double check the settings and hit enter through all the options.

NOTES: If you have customized any scripts in the bin or agi folders,
then make sure you back them up before running the install.pl script.
This script will replace existing files in the astguiclient installation.

6. For each of your ViciDial servers:

go to the Admin -> Servers -> Modify Server
page and set each one to "Rebuild conf files = Y" and click submit.
This will rebuild the conf files to ensure any changes are updated.

7. On one server only, update your phone codes data:

/usr/share/astguiclient/ADMIN_area_code_populate.pl --purge-table –debug


PostPosted: Tue Feb 15, 2011 11:21 am
by williamconley
It looks good, but from experience: You MUST restore that database on another server to prove it was successfully backed up. Other things can be "worked with" and/or "reconstructed". But if the database "goes missing" or was corrupted ... one more booboo and you can lose your job. We've had to clean that up more than once.

All that's really required is to create a new (any name) database on any mysql server, apply the backup data to it, and verify a new lead from Today is actually in there. Then, if really bad things happen, at least you have your database and can 'work it out' if you need to.

It's not necessary to perform this restore daily, but during a major upgrade it's a necessary Best Practice.

PostPosted: Tue Feb 15, 2011 11:22 am
by Trying
Thanks for the reply! Looking forward to our first upgrade :)

PostPosted: Tue Feb 15, 2011 11:26 am
by williamconley
Vicidial's upgrade procedure has proven very reliable. We have yet to hear of or have any problems ... as long as the database is available. We've upgraded from 2.0.5 to 2.2.1 or 2.4 (starting with VicidialNOW, Vicibox or Scratch and ending with Vicibox or GoAutoDial 2.2.1). So far, no serious issues or complications EXCEPT occasional 2.4->2.4 updates that required editing of the sql file to remove previously applied changes (that could not be made again) to get to the final dbschema.

PostPosted: Tue Feb 15, 2011 11:43 am
by Trying
Here are the adjusted steps:

1. Backup existing system:

1.1 Run this for a 1-server system or server with database on it:
(this may take hours on large system)
/usr/share/astguiclient/ADMIN_backup.pl --debugX

1.2 Run this on dialer/Asterisk-only servers:
(do not run this if you only have one server):
/usr/share/astguiclient/ADMIN_backup.pl --debugX --without-db --without-web

2. Test backup:

Create a new (any name) database on any mysql server, apply the backup data to it, and verify a new lead from Today is actually in there.

3. On ALL servers: (Database, web, telephony)

cd /usr/src/astguiclient

Download Vicidial trunk on ALL servers

svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk

4. On ONLY database server:

Going into mysql and executing the upgrade sql file:
mysql
use asterisk
\. /usr/src/astguiclient/trunk/extras/upgrade_2.8.sql
quit

5. On ALL servers: (Database, web, telephony)

cd /usr/src/astguiclient/trunk
perl ./install.pl
NOTES: If you have customized any scripts in the bin or agi folders,
then make sure you back them up before running the install.pl script.
This script will replace existing files in the astguiclient installation.


6. On one server only, update your phone codes data:

/usr/share/astguiclient/ADMIN_area_code_populate.pl --purge-table –debug

PostPosted: Wed Feb 16, 2011 6:47 am
by DarknessBBB
For me the mysql login works only in this way:
Code: Select all
vicidial:~ # mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
vicidial:~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 173942
Server version: 5.1.46-log SUSE MySQL RPM

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>


Can this thread be sticky? :)

PostPosted: Wed Feb 16, 2011 7:10 am
by mflorell
It has been made sticky. Please correct any changes made in the first posting.

PostPosted: Wed Feb 16, 2011 7:15 am
by Trying
Changes made. Let me know if there are any other additions or changes to be made.

PostPosted: Tue May 17, 2011 8:17 pm
by dspaan
Thanks for this guide, it worked just fine for me :D

PostPosted: Fri Jun 17, 2011 7:41 am
by josh1856
Is there any specific reason why every time a do a SVN update my settings in the admin.php disappear?

All the campaign, lists and data is there however any of the settings are basically gone. For instance if I go to campaigns they are all listed, however there is not any data set within the campaign itself like the campaign ID, campaign name, description, change date, active are all just blank and none of my settings were saved.

Is there a way to restore those settings from my backup?

ViciBox Redux 3.1.0 | ViciDial 2.4-317a | Build: ? | Dbschema ? | Asterisk 1.4.27.1-vici | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation

PostPosted: Fri Jun 17, 2011 8:01 am
by mflorell
Are you doing a database schema upgrade after running the install.pl?

PostPosted: Fri Jun 17, 2011 8:04 am
by josh1856
Matt,
I just ran a database schema upgrade using the command

mysql -f --database=asterisk < /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql

and then ran the upgrade again and everything is working like a charm now.

thanks.
jpg

Re: Vicibox SVN Trunk Upgrade

PostPosted: Thu Aug 25, 2011 11:15 am
by douglaswscott
I did all this, everything works except my admin.php - no login no screen.

Trying wrote:I have put together the little procedure underneath to upgrade Vicibox to SVN Trunk. The two reasons for putting this together is to ensure I do not make a mistake with my first upgrade and also help newbies. Could you please check if the steps and procedures are 100% correct? Please also change or add whatever is needed.



1. Backup existing system:

1.1 Run this for a 1-server system or server with database on it:
(this may take hours on large system)
/usr/share/astguiclient/ADMIN_backup.pl --debugX

1.2 Run this on dialer/Asterisk-only servers:
(do not run this if you only have one server):
/usr/share/astguiclient/ADMIN_backup.pl --debugX --without-db --without-web

2. Test backup:

Create a new (any name) database on any mysql server, apply the backup data to it, and verify a new lead from TODAY is actually in there.

3. On ALL servers: (Database, web, telephony)

cd /usr/src/astguiclient

Download Vicidial trunk on ALL servers

svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk

4. On ONLY database server:

Going into mysql and executing the upgrade sql file:
mysql (alternatively use mysql -u root -p)
use asterisk
\. /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql
quit

5. On ALL servers: (Database, web, telephony)

cd /usr/src/astguiclient/trunk
perl ./install.pl

Your original settings should still be the same so you really just have to double check the settings and hit enter through all the options.

NOTES: If you have customized any scripts in the bin or agi folders,
then make sure you back them up before running the install.pl script.
This script will replace existing files in the astguiclient installation.

6. For each of your ViciDial servers:

go to the Admin -> Servers -> Modify Server
page and set each one to "Rebuild conf files = Y" and click submit.
This will rebuild the conf files to ensure any changes are updated.

7. On one server only, update your phone codes data:

/usr/share/astguiclient/ADMIN_area_code_populate.pl --purge-table –debug


PostPosted: Thu Aug 25, 2011 5:21 pm
by williamconley
try not to doublepost.

PostPosted: Thu Sep 01, 2011 6:35 pm
by randy_delgado_03
@Trying

Are these steps applicable to 2.4 > 2.4?

Anyone have tried this upgrade from 2.4 to 2.4?

Thanks ...

PostPosted: Thu Sep 01, 2011 7:11 pm
by williamconley
with 2.4 to 2.4 we have found that it can be more "safe" to open that sql file, find your present db_schema_version and delete all the lines above (as those have obviously run, resulting in your present schema). Then execute all the remaining lines only.

we've found this to remove certain bugs for earlier versions of 2.4 where the lines between creating and deleting certain fields and indexes get somewhat fuzzy ... which can stop the mysql upgrade in its tracks. but so far we've had very few problems if we have deleted the prior database entries. runs quite smoothly.

also remember that there are (from time to time) changes required or suggested in the sample ".conf" files, and we always recommend loading these fresh on each install to be sure (say yes when prompted). But this obviously means you cannot have any custom entries in the .conf files ... find a way to store everything in the vicidial database tables (there are several places for custom entries).

PostPosted: Thu Sep 08, 2011 1:50 pm
by knotbeerdan
Worked perfectly!!! Thanks :lol:

SVN Upgrade from 2.0.5 to the lates

PostPosted: Tue Jan 10, 2012 9:20 am
by voipart
I have tried my upgradation exactly as mentioned in this post of SVN Upgradation,
everything went on well except too many messages (which scrolled on) in SqL upgradation part,
Now when I login from web I have no administrative access, Any modification ( i can see List of , phones, IngruupId, DID, etc...) but click on Modification not allowing , also I cannot see any users in the user list...
When I look on my database directly I can see all users (about 100) there and Active.
I DOnt know where it went wrong, appreciate help from you experts,

My instalation is Dual Server
Web+DB in One Server, Asterisk In another Server , Vicidial Version 2.0.5 | Asterisk 1.2.30.2 | Users 80 | Servers Quad Process Dell Servers

All of them ware working perfect But in inbound calls the call Recording has a delay in starting Recording( 5-15 sec very call to call) (Configuration: ALLFORCE /0 Delay)
[/b]

Solution for Not seeing Users after upgradation

PostPosted: Wed Jan 11, 2012 10:27 am
by voipart
In regards to my own posting as I could not see users or not able to edit any records after an update from 2.0.5 to 2.4
I have found that it worked when i have updated s1l from 2.2.0 and then to 2.4

\. /usr/src/astguiclient/trunk/extras/upgrade_2.2.0.sql
\. /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql

PostPosted: Wed Jan 11, 2012 10:38 am
by Trying
Thanks for the feedback!

PostPosted: Wed Jan 11, 2012 1:41 pm
by williamconley
the upgrade instructions do mention that you must upgrade incrementally. you cannot skip a generation.

2.0.4
2.0.5
2.2.0
2.4

PostPosted: Tue Feb 07, 2012 4:05 pm
by rougeleaf
Speaking of versions.

When upgrading to a newer SVN trunk, where is the list of versions the other scripts will be or should be.

for example I have,
admin.php VERSION: 2.4-357a BUILD: 120125-2107
agc.new/vicidial.php 2.2.1-260 BUILD: 100527-2211

Thanks in advanced.

PostPosted: Tue Feb 07, 2012 4:11 pm
by williamconley
there are no "other scripts". When you upgrade, the installer will automatically install ALL necessary scripts. ALL. Not just the modified ones. You are not "Upgrading" Vicidial.

You are "Upgrading" the SVN source code from a prior SVN to a different SVN. Then you are "upgrading" the database using the sql commands included in that source. Then you are resinstalling Vicidial on top of the prior vicidial installation.

When you are done, the "script versions" will be whatever was downloaded with the rest of the source via svn. There is no present codified correlation between script versions and SVN version.

PostPosted: Sat Feb 18, 2012 6:33 pm
by chasejordan1
What if my DB server is just a CentOS DB server no astguiclient?

PostPosted: Sun Feb 19, 2012 9:40 am
by williamconley
the location of the database is not relevant. as long as you are capable of executing commands on that database server as a common sense way to update the correct database.

PostPosted: Thu Feb 23, 2012 6:41 pm
by rougeleaf
there are no "other scripts". When you upgrade, the installer will automatically install ALL necessary scripts. ALL. Not just the modified ones. You are not "Upgrading" Vicidial.

You are "Upgrading" the SVN source code from a prior SVN to a different SVN. Then you are "upgrading" the database using the sql commands included in that source. Then you are resinstalling Vicidial on top of the prior vicidial installation.

When you are done, the "script versions" will be whatever was downloaded with the rest of the source via svn. There is no present codified correlation between script versions and SVN version.


Perhaps I did not ask correctly, but I think I found an answer...
We found that version 2.2.1-260 BUILD: 100527-2211 is not correct, but does work.
This is the version we need to work with the new SVN update
/agc/vicidial.php# VERSION: 2.4-340c BUILD: 111227-1940

The SVN update does not update the index.php home page. Thus the AGENT LOGIN link was taking us to
Code: Select all
http://host*/agc.new/vicidial.php?relogin=YES

where the newest version is found
Code: Select all
http://host/agc/vicidial.php?relogin=YES


So yes there is some correlation between versions
where features such as: screen labels, call notes, lead search; do require version 2.4-340c. Since agc.new was not replaced you can understand my confusion :wink:

We are enjoying all the new feature, thanks to all those involved in writing them. Any time frame on an updated manual?

PostPosted: Thu Feb 23, 2012 7:51 pm
by mflorell
This is the Vicibox forum, not the goautodial forum, we don't support the altered goautodial agent interface.

Re: Vicibox SVN Trunk Upgrade

PostPosted: Sun Jun 10, 2012 8:11 pm
by GaD
Just as an added note to this thread. I've just done an SVN update on my system with the 'tutorial' listed up there and came to realize that when I went into 'Campaign Details I was getting an error: "Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /srv/www/htdocs/vicidial/admin.php line 20432".

To not bore you with a bunch of info.... When you do an update on the Database side by issuing a
"\. /usr/src/astguiclient/trunk/extras/upgrade_2.4.sql" from mysql prompt you also need to 'run':
"\. /usr/src/astguiclient/trunk/extras/upgrade_2.6.sql"

The 2.6 upgrade will add 3 columns to the vicidial_campaigns table " in_group_dial | in_group_dial_select | safe_harbor_audio_field". If you don't do the 2.6 upgrade SQL you will have problems...

Perhaps Trying or Matt or William can update the 'tutorial' provided up there which has been my 'Update Bible' all along!

Cheers!

Re: Vicibox SVN Trunk Upgrade

PostPosted: Fri Jun 22, 2012 3:44 am
by Trying
Hi

Thank you very much for this. I updated the post.

Re: Vicibox SVN Trunk Upgrade

PostPosted: Mon Jul 16, 2012 12:01 pm
by tarundas
7. On one server only, update your phone codes data:

/usr/share/astguiclient/ADMIN_area_code_populate.pl --purge-table –debug


Does it mean it needs to be run on any one server in a cluster setup? or this has to do with single sever setup?

Re: Vicibox SVN Trunk Upgrade

PostPosted: Mon Jul 16, 2012 12:06 pm
by Trying
As far as the instructions go only on one server in a cluster set up. Surely it won't hurt running it on all the servers if you want to be safe :D

Re: Vicibox SVN Trunk Upgrade

PostPosted: Mon Jul 16, 2012 12:10 pm
by GaD
Only in one server. The script will connect to the database and make the appropiate arrangements regarding the timezones. If you do it once in every server you will end up doing the same thing over and over again so long you are sunning it in servers within the same cluster. If you have separate clusters, you need to run it once (from only one computer) in every cluster every time you update.

Re: Vicibox SVN Trunk Upgrade

PostPosted: Mon Jul 16, 2012 2:59 pm
by williamconley
Of course, if you use the Vicibox Redux installation and answer the questions properly, the various servers install scripts should handle this for you (ie: install it on only one server).

We usually just run this script on the DB server for each system. Since there is Only One DB server in each cluster (and each standalone).

Re: Vicibox SVN Trunk Upgrade

PostPosted: Wed Aug 15, 2012 10:39 pm
by simonc
To upgrade from BUILD: 120529-2112 to the latest SVN code, i assume that i don't need to rerun the database 2.6 script?

Re: Vicibox SVN Trunk Upgrade

PostPosted: Mon Aug 27, 2012 4:17 pm
by randy_delgado_03
Is it possible to upgrade for a particular build? Or is it possible to just the files from a particular build?

Re: Vicibox SVN Trunk Upgrade

PostPosted: Tue Aug 28, 2012 4:10 am
by DomeDan
simonc: I think you should, because time to time things get changed in the database structure

randy_delgado_03: Yeah, kind of, but you need to find out the revision of that specific build
Code: Select all
svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk
svn log trunk | less
#find out the revision number, lets say you want this version: "r1847 | mattf | 2012-08-10 14:31:28 +0200 (fre, 10 aug 2012) | 1 line | Added recording and webserver functions to the agent API"
#then specify that with svn like this:
svn checkout svn://svn.eflo.net:3690/agc_2-X/trunk@1847 trunk_1847
ls trunk_1847

Re: Vicibox SVN Trunk Upgrade

PostPosted: Thu Nov 22, 2012 9:18 am
by racosta79
Hello everybody!

I have a System installed using Vicibox Redux 3.1.15 with the following server components:
1 Database
2 Asterisk
2 Web
1 FTP

Now I need to upgrade it to the latest Vicibox Server 4.0.1 SVN version.

As this is a very important call center that cannot be stopped, I wonder if you can confirm that this procedure is correct?

Thank you in advance!

Roger Acosta
Viva Paraguay!

Re: Vicibox SVN Trunk Upgrade

PostPosted: Thu Nov 22, 2012 9:36 am
by Trying
You need to specify at least what the version and build of the Vicidial is. Also what is your database schema number? Above 1316 or below?

Remember Vicibox is not a Vicidial version, it is merely an installer. The easiest is always obviously to simply just upgrade Vicidial and not reinstall everything with a new Vicibox disc.

Re: Vicibox SVN Trunk Upgrade

PostPosted: Thu Nov 22, 2012 9:39 am
by Trying
The below is an extract from the upgrade document:

########## UPGRADING FROM 2.4 TO 2.6 ##########

OPTIONAL STEPS(But highly recommended) - Backup existing system:

1. Run this for a 1-server system or server with database on it:
(this may take hours on large system)
/usr/share/astguiclient/ADMIN_backup.pl --debugX

2. Run this on dialer/Asterisk-only servers:
(do not run this if you only have one server):
/usr/share/astguiclient/ADMIN_backup.pl --debugX --without-db --without-web


REQUIRED STEPS!!!

1. Check system_settings, make sure you are at DB Schema Version 1316 or higher
If not, run the instructions for 2.2.0 to 2.4 before this section.

2. upgrade the MySQL asterisk database(you have two options):
A. Running the upgrade file directly from Linux:
mysql -f --database=asterisk < /path/from/root/extras/upgrade_2.6.sql

B. Going into mysql and executing the upgrade sql file:
mysql
use asterisk
\. /path/from/root/extras/upgrade_2.6.sql
quit

3. install new files:
perl ./install.pl
NOTES: If you have customized any scripts in the bin or agi folders,
then make sure you back them up before running the install.pl script.
This script will replace existing files in the astguiclient installation.

4. For each of your ViciDial servers, go the Admin -> Servers -> Modify Server
page and set each one to "Rebuild conf files = Y" and click submit.
This will rebuild the conf files to ensure any changes are updated.

5. On one server only, update your phone codes data:
/usr/share/astguiclient/ADMIN_area_code_populate.pl --purge-table --debug

########## UPGRADING FROM 2.2.0 TO 2.4 ##########

OPTIONAL STEPS(But highly recommended) - Backup existing system:

1. Run this for a 1-server system or server with database on it:
(this may take hours on large system)
/usr/share/astguiclient/ADMIN_backup.pl --debugX

2. Run this on dialer/Asterisk-only servers:
(do not run this if you only have one server):
/usr/share/astguiclient/ADMIN_backup.pl --debugX --without-db --without-web


REQUIRED STEPS!!!

1. upgrade the MySQL asterisk database(you have two options):
A. Running the upgrade file directly from Linux:
mysql -f --database=asterisk < /path/from/root/extras/upgrade_2.4.sql

B. Going into mysql and executing the upgrade sql file:
mysql
use asterisk
\. /path/from/root/extras/upgrade_2.4.sql
quit

2. install new files:
perl ./install.pl
NOTES: If you have customized any scripts in the bin or agi folders,
then make sure you back them up before running the install.pl script.
This script will replace existing files in the astguiclient installation.

3. For each of your ViciDial servers, go the Admin -> Servers -> Modify Server
page and set each one to "Rebuild conf files = Y" and click submit.
This will rebuild the conf files to ensure any changes are updated.

4. On one server only, update your phone codes data:
/usr/share/astguiclient/ADMIN_area_code_populate.pl --purge-table --debug


Re: Vicibox SVN Trunk Upgrade

PostPosted: Thu Nov 22, 2012 10:24 am
by racosta79
Thank you for your reply.

This is my Vicidial version and build number:
VERSION: 2.2.1-237 BUILD: 100510-2015

Version: 2.2.1 DB Schema Version: 1193 DB Schema Update Date: 2012-03-09 23:01:57 Auto User-add Value: 101 Install Date: 2012-03-09

Thank you again!

Roger