Difference between revisions of "Upgrade"
(→Version 3.1.4 to 3.2) |
|||
Line 115: | Line 115: | ||
No longer using hunt groups. So the backend has changed so keep in mind that you need to reset call forward and follow me settings. They are still listed in app -> hunt groups. After updating the info in call forward, follow me you should delete the hunt group. | No longer using hunt groups. So the backend has changed so keep in mind that you need to reset call forward and follow me settings. They are still listed in app -> hunt groups. After updating the info in call forward, follow me you should delete the hunt group. | ||
+ | |||
+ | ===Version 3.2 to 3.3=== | ||
+ | FreeSWITCH changed the syntax to connect to the database so numerous LUA scripts had to be updated. If you customized any of the lua scripts make a backup of the FreeSWITCH scripts directory. Then remove the contents of the freeswitch/scripts directory and then run advanced -> upgrade schema (which will detect the missing scripts and replace them). | ||
===Version 2 to 3.0=== | ===Version 2 to 3.0=== |
Revision as of 02:40, 2 July 2013
Contents
What Is Upgrading?
The FusionPBX code is constantly evolving - bug fixes being submitted, additions to improve security, to make it look nicer, to be more flexible, and best of all - new features. A complete summary of the changes can be found on the google code page.
SVN Release Revisions
- r2523 = 3.0
- r2585 is 3.0.4
- r2757 is 3.1 release
- r2777 is 3.1.1 release
- r2827 is 3.1.2 release
- r2897 is 3.1.3 release
- r2907 is 3.1.4 release
- r3694 is 3.2 release
- r3978 is 3.3 release
How to upgrade
To upgrade, you will need to get the latest source code.
Depending on how extreme the changes have been since your last update, you may need to run one-time special commands to bring your install up to date.
Step 1: Source
Upgrade the code via Subversion/SVN
- Login into the web interface with a user account assigned to the superadmin group.
- Login to the console with either the ssh, the locally.
- Backup It's a good idea to make a backup. If using sqlite, your backup will easily include the SQL database.
cd /var/www cp -R fusionpbx fusionpbx_backup
- Change the directory to the FusionPBX directory
cd /var/www/fusionpbx
- Update the source code (example assumes fusionpbx is in /var/www/fusionpbx)
svn update
- Permissions re-set the permissions on the fusionpbx directory tree - when you do svn update it sets the permissions on any updated files to match the account that you are running svn update with, therefore if that account is different to the web server account it will result in some files no longer being accessible. Therefore to fix this you should re-apply the permissions in fusionpbx and recursively in all directories inside it. The example assumes the web server runs as user 'www-data' and fusionpbx is installed to /var/www/fusionpbx. (chown -Rv Ownername:GroupName /var/www/fusionpbx)
chown -Rv www-data:www-data /var/www/fusionpbx
Step 2: Upgrade
Many updates have changes to the database. The upgrade_schema script
- Upgrade from the GUI From within the web site, run Advanced -> Upgrade Schema which will add any needed newer tables or columns.
- Alternatively, simply navigate to: http://domain_or_ip/core/upgrade/upgrade_schema.php
- Upgrade from the Command Line An alternative to running upgrade_schema.php from the GUI is to run the upgrade.php from the command line. It was designed to make the upgrade easier. If you did not login when updating the FusionPBX source code then you will need to run the upgrade.php file from the command line. Make sure to use the full path to the PHP file.
#as root run the following cd /var/www/fusionpbx /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php
- If your screen was nicely formatted with a fusionpbx theme, and suddenly now goes to a black and white screen with familiar text but no theme, it is because you were using a theme which no longer exists in the latest version of the code. If this happens to you navigate to:
http://domain_or_ip/mod/users/usersupdate.php
Then scroll down to where it says "Template" and select one of the valid templates from the drop down list. Then press Save. It will be fixed now and you can continue with the remaining steps below. (Note that any users who have invalid templates selected will also have the same problem you did - but you can fix them from the user manager option in the accounts menu)
Step 3: Menu
especially needed if your menu disappeared.
v1 and v2
Now update the menu to the latest version.
http://domain_or_ip/core/menu/menu_restore_default.php
Press 'Restore Default' on the top right.
v3
- https://your.ip/core/menu/menu.php
- click 'e' next to the default menu
- click the restore default button.
- https://your.ip/logout.php
- https://your.ip/login.php
Step 4: Re-generate Settings
Sometimes variable names changes. In rev 1877 v_config_cli.php variable names changed which caused no fax to email emails or voicemail emails to be sent as the SMTP details did not exist.
Go to System -> Settings and then click save. This will re-generate v_config_cli.php and any other needs config files.
Upgrade Path
Version specific instructions.
Version 3.1.4 to 3.2
Ubuntu/Debian cd /var/www/fusionpbx svn update Advanced -> Upgrade Schema
Menu
If you cant see the menu after upgrading try the following in your browser replace x.x.x.x with your ip or domain name.
x.x.x.x/core/menu/menu.php
Edit the menu make sure the language is set to en-us. Press 'Restore Default'
Default settings
x.x.x.x/core/default_settings/default_settings.php category: language type: code value: en-us
Migrating email to the new FusionPBX native voicemail.
wget http://fusionpbx.googlecode.com/svn/trunk/scripts/upgrade/voicemail_export.php
Run from the browser it will take the voicemail data from the FreeSWITCH database and copy the information into the FusionPBX database.
http://x.x.x.x/voicemail_export.php
Remove the export file
rm voicemail_export.php
Call Forward / Follow Me
No longer using hunt groups. So the backend has changed so keep in mind that you need to reset call forward and follow me settings. They are still listed in app -> hunt groups. After updating the info in call forward, follow me you should delete the hunt group.
Version 3.2 to 3.3
FreeSWITCH changed the syntax to connect to the database so numerous LUA scripts had to be updated. If you customized any of the lua scripts make a backup of the FreeSWITCH scripts directory. Then remove the contents of the freeswitch/scripts directory and then run advanced -> upgrade schema (which will detect the missing scripts and replace them).
Version 2 to 3.0
- LESS than or EQUAL to revision 1877, use the migration tool.
http://code.google.com/p/fusionpbx/source/browse/#svn%2Ftrunk%2Fscripts%2Fupgrade
- If greater than revision 1877, use latest.
svn update
See 3.0 Upgrade Notes.
Additional Info
Revision
How to get the FusionPBX revision number:
Ubuntu/Debian svn info /var/www/fusionpbx
Version
How to get the FusionPBX version number. Menu -> Status -> System Status
Notes
If your version is from...
- before 2011-01-04 - r669 - then you'll need to run the following commands from the Advanced -> SQL Query tool. These changes the group member to user. It also moves all users who are members of the 'member' group over to the 'user' group.
update v_groups set groupid = 'user', groupdesc = 'User Group' where groupid = 'member'; update v_group_members set groupid = 'user' where groupid = 'member';
- Click Execute (Type 'default', Table 'leave blank' Click Execute)
- results: 0 for both queries
- Log out
- Log in
- Proceed to update the menu
- before 2011-02-20 r836
"Apply settings automatically with an option to display the apply settings prompt with a variable in system -> variables -> apply_settings = true"
If things go wrong: SQLite Database Restore
You shouldn't need to do this, and it's probably the wrong thing to do, but if your database won't load after an upgrade...
Synopsis of what happened [to me]
You're probably seeing an error like this:
(Fatal error: Call to a member function execute() on a non-object in /var/www/fusionpbx/includes/menu.php on line 76)
- You were not logged into the browser interface
- You updated from svn via CLI
- You went to login to run upgrade->Schema, but couldn't due to some changes.
Remedy
- from cli
mv /var/www/fusionpbx /var/www/fusionpbx.bak reinstall the lastest fusionpbx...
- if you are using svn checkout make sure you set the permissions correctly on the fusionpbx directory structure before proceeding to the next step
- from browser
login via the gui, complete the install... Don't log out
- back to cli
cd /var/www/fusionpbx/secure mv fusionpbx.db fusionpbx.db.new cp /var/www/fusionpbx.bak/secure/fusionpbx.db ./ chown www-data:www-data fusionpbx.db (or whatever your webserver user/grp is)
- from browser
go to: http://domain_or_ip/core/upgrade/upgrade_schema.php This should fix the database.
You will need to have FusionPBX recreate all of the FreeSWITCH xml files. When you reinstalled, they were properly deleted (the database was empty at that point). Edit an extension/gateway/route/etc, and click save (you won't need to edit it).
In the future
Make sure you're logged into the browser interface before doing an upgrade...