Asterisk logo

Upgrading FreePBX – The CLI way

I’m always nervous when I upgrade my FreePBX system across major versions. There is a lot happening and our system has a lot of special settings designed for how we use it. In this article I will document the best way I have found to upgrade from version 15 to 16 using the CLI.

Why use the CLI?

Over the years of working with FreePBX, I have found that the GUI updates don’t seem to always happen smoothly. It is also confusing on what is going on behind the scenes so that if it does go bad, I know where to get in and fix things up. I may be “old school” but I prefer the CLI so I can see what is going on…. and I have found the CLI method always seems to work.

Part 1: Clean up and Prepare

Login to the system as your non-root user. For most of this we will use sudo so it can be done as a non-privileged user.
Update the existing system:

sudo yum upgrade -y

Upgrade all the current modules

sudo fwconsole ma upgradeall

Fix up any file permission issues.

sudo fwconsole chown

Reload the services

sudo fwconsole reload

Reboot the server.

sudo reboot

Part 2: Upgrading to 16

Log back in and now we need to change to the root user. I have had some issues trying to do this all with sudo.

sudo su -

Download the version upgrade module

fwconsole ma downloadinstall versionupgrade

Check once again that the file permissions are correct (and fix if wrong)

fwconsole chown

Reload services

fwconsole reload

Now run the check to make sure your system is ready for the upgrade. It is quite common for the check to identify and unsupported or depreciate modules. Make sure there are none, if there are then delete them with fwconsole ma delete MODULENAME and then a fwconsole reload.

fwconsole versionupgrade --check

If it passes the check, your system is clean abnd you can go ahead and start the upgrade.

fwconsole versionupgrade --upgrade | tee -a freepbx16_upgrade.log

At the end, the system will tell you it is completed the upgrade. you will have the <CNTL><C> to exit at that point. One everything looks good, then reboot the server and enjoy the new fresh upgrade.


Leave a Comment

Your email address will not be published. Required fields are marked *