This script should only be used on PBXact and FreePBX 10.13.66-X systems and will take your system to the latest PBXact and FreePBX SNG7-PBX-64bit releases.
As this update performs base OS operations, it's highly recommended to perform a full backup of your system and moving these files to a secure location before you continue through this guide.
If your upgrade fails, you can run the recovery script to repair anything missing. Please see 'Recovering from a failed Upgrade' section.
Summary
This allows you to upgrade the Official Distro from 6 to SNG7, and in the process upgrade FreePBX (or PBXact etc) from 13 to 14.
Supported Platforms
- FreePBX Distro
- PBXact Distro
- Other compatible distros
Prerequisites
- 64bit Operating System on current machine (see note below)
- At least 10gb of available space in /
- Internet connectivity (about 200mb of data needs to be downloaded)
- Not using Hyper-V as the hypervisor
SNG7 is a 64 bit only operating system. Unfortunately, It is not possible to convert a 32 bit operating system to 64 on the fly, If you are currently running a 32 bit operating system, the simplest way to upgrade is to use the FreePBX Conversion tool, which will allow you to do a live backup of a running machine and restore it to a new 14 machines.
Upgrading a Hyper-V system is explicitly blacklisted due to compatibility issues when changing from a Non-UEFI image to a UEFI capable image. The only way to upgrade a machine running on HyperV is to create a new machine, and then use the FreePBX Conversion Tool to migrate your complete machine to a new one. This is not a destructive process, and can be run on a production machine at any time.
Preparation
The Upgrade is managed by a RPM. Simply install the RPM with the following command
yum -y install http://package1.sangoma.net/distro-upgrade-1807-2.sng7.noarch.rpm
Starting Upgrade
The RPM installed above creates the file 'distro-upgrade' which validates the machine, and then starts downloading the requirements. This does not cause any outage, and can be run at any time. After installing this, you can reboot the machine at any time and the upgrade will be automatically started.
distro-upgrade
Output
[root@localhost ~]# distro-upgrade ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ Sangoma 6 to 7 Upgrade Tool ┃ ┃ ┃ ┃ Distro Upgrade - Version 1710-3.sng7 ┃ ┃ Build Date: 2017-10-28 ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ Checking prerequsites... Checking bitsize of machine [ ✔ ] - x86_64 Checking for 32 bit packages [ ✔ ] - No i686 rpms found Checking available disk space [ ✔ ] - 56G Available Checking for outdated system [ ✔ ] - No pending updates. Checking for HA Setup [ ✔ ] - Not a HA system All prerequsites passed! Are you ready to upgrade your machine to SNG7? This process requires two reboots, and will download approximately 400mb of files before starting. There will be no interruption to service until this machine is rebooted. Download files required for upgrade [Yn]?
Note that this can be run while the machine is up and processing calls. There is no outage until you reboot the machine. The speed of this is purely related to your internet connection speed. You may interrupt and restart the upgrade at any time, and it will resume downloading.
If there are any errors, do not continue! You must resolve the errors (instructions will be provided in the error message) before continuing. You can then re-run distro-upgrade to validate your machine is ready to be upgraded.
After you have passed all the tests, the download can be started by entering 'y' at the prompt.
Download files required for upgrade [Yn]? y ######### Starting setup upgrade on Fri Oct 27 21:06:01 EDT 2017 ######### ######### Creating upgrade repofile ######### ######### Installing needed packages ######### Loaded plugins: fastestmirror, kmod Setting up Install Process Loading mirror speeds from cached hostfile upgrade | 2.9 kB 00:00 ... etc ... Dependency Installed: libgcrypt-devel.x86_64 0:1.4.5-11.el6_4 libgpg-error-devel.x86_64 0:1.7-4.el6 libxml2-devel.x86_64 0:2.7.6-17.el6_6.1 libxslt-devel.x86_64 0:1.1.26-2.el6_3.1 pcre-devel.x86_64 0:7.8-6.el6 zlib-devel.x86_64 0:1.2.3-29.el6 Complete! ######### Running preupgrade to inventory running system ######### ######### Running upgrade-tool to download and prepare upgrade ######### ######### Verified sangoma-release in package.list ######### ######### Reboot to finish this stage of the upgrade ######### ######### Finished setup upgrade on Fri Oct 27 21:14:04 EDT 2017 ######### Preparations complete! Please reboot your machine when convenient. This machine will install all the new and upgraded packages, and then reboot for a second time automatically. After the second reboot, it will then continue the upgrade process automatically. When the upgrade is complete, you will be presented with a standard login prompt. [root@localhost ~]#
Perform Update
First Reboot (Stage 1)
You need to reboot the machine, which will then perform the upgrade. The 'system upgrade' option will be automatically selected. You can select a previous kernel if you do not want to upgrade at this time.
After selecting 'System Upgrade' the machine will upgrade all the required packages
The speed of the upgrade depends on your machine. Note that the package 'selinux-policy-targeted' will take a long period of time to run. This is expected, as it needs to check and possibly re-label every file on the system.
When the first stage of the upgrade is finished, the machine will reboot and will continue the upgrade process.
Second Reboot (Stage 2)
After the Core OS has been upgraded, the machine will reboot into Stage 2, which finishes the upgrade.
Warning: If your machine has multiple network interfaces, it is possible that their names may change as part of the upgrade. If so, the machine will abort the upgrade and require you to fix this manually. If you are unable to fix this yourself, you should roll back to your backup, and contact support.
This also upgrades all the PBX Modules
When the upgrade is finished you will be presented with a Login prompt, and you can log into your system.
_____ ____ ______ __ | ___| __ ___ ___| _ \| __ ) \/ / | |_ | '__/ _ \/ _ \ |_) | _ \\ / | _|| | | __/ __/ __/| |_) / \ |_| |_| \___|\___|_| |____/_/\_\ NOTICE! You have 5 notifications! Please log into the UI to see them! Current Network Configuration +-----------+-------------------+--------------------------+ | Interface | MAC Address | IP Addresses | +-----------+-------------------+--------------------------+ | eth0 | 00:50:56:B4:86:DB | 10.195.1.11 | | | | fe80::250:56ff:feb4:86db | +-----------+-------------------+--------------------------+ Please note most tasks should be handled through the GUI. You can access the GUI by typing one of the above IPs in to your web browser. For support please visit: http://www.freepbx.org/support-and-professional-services [root@upgrade1 ~]#
Recovery from a failed upgrade
It is possible that due to unforeseen system configurations, the upgrade may fail. This is often caused by unexpcted (and manually installed) RPMs on your machine. The first thing to try is to run the repair script, by pasting the following commands:
**DO NOT RUN on FreePBX 15 or newer, only for 13 to 14 upgrade failures**
wget http://package1.sangoma.net/post_upgrade chmod 755 ./post_upgrade ./post_upgrade
**DO NOT RUN on FreePBX 15 or newer, only for 13 to 14 upgrade failures**
This will attempt to re-run the upgrade script. It will try harder to resolve any issues that may be found, and will be more verbose with errors if it can't.
Troubleshooting
Most problems can be solved by running 'yum update' and reading the errors. If there is an error about 'AAA conflicts with BBB, in package from XXX', you can simply 'rpm --erase --nodeps XXX', and run 'yum update' again.
If you can not solve your problem, you will need to post the errors on the FreePBX Forums.
9 Comments
Matthew B
I had to also perform yum update before I could let it rip. the distro-upgrade told me that there were pending updates. I was able to get the pending yum update executed, and re-ran distro-upgrade and them it was able to continue after the prerequisites were met.
Christopher Phillips
Unfortunately I'm getting what seems to be a sysadmin license error after the process completes. Unfortunately I didn't grab the upgrade logs to submit as I ran out of time this morning and had to revert back to my snapshot to get the phones up and running again. I will be doing some additional testing this weekend and will grab the logs then.
Has anyone else seen this?
http://imgur.com/a/oqaos
Bryan Walters
That means you still have old commercial modules on the system which are not compatible with the new version of PHP.
Christopher Phillips
Hi Bryan. Thanks for the info. Based on the screenshot, I assume it's the SysAdmin module that needs to be removed and then later updated?
Bryan Walters
While sysadmin is the culprit in this case, as part of the upgrade we remove all commercial modules (using rm) and then upgrade them to new versions later in the script.
Christopher Phillips
This morning I disabled the SysAdmin and Endpoint modules before doing the upgrade (I did not remove them, only disabled them). The upgrade completed, and phone functionality was restored, however the web GUI would not load. Something was causing Apache to fail loading.
Console access did not give me any errors either, until I ran the command to re-enable all disabled modules, and then I got the same PHP error from the screenshot above.
As another test, I reverted back to my snapshot and tried the upgrade again, this time with the SysAdmin module enabled (and Endpoint disabled). Phone functionality failed and I received the same PHP error as above.
You mentioned above "as part of the upgrade we remove all commercial modules", but I'm wondering if I should remove the two I have before I even attempt the update.
Bryan Walters
Christopher Phillips This is more easily discussed in either the forums or if you have a ticket open I'd be happy to go take a look there rather than here in the wiki.
Seth
I have two servers in HA running under Distro 6. Are there plans to include an upgrade to SNG7 like this for HA systems? ( I know HA is not currently supported in 7).
Thank you!
Seth
Bryan Walters
Seth, When SNG7 has a comparable solution we can look at removing the restriction from our distro-upgrade process.