My Upgrade process

s2svoip

Member
Dec 9, 2019
267
8
18
45

I got some PMs about sharing how I do my fusion upgrades, so thought I would post this here. would love some critique from the experts, as I certainly am not one. I have assumed a basic knowledge of fusion / linux so am not providing all the commands. I like this route as I just move the external IP from the old box to the new Box, any issues and I can just move it back. you also get a brand new clean up to date OS. I only do this about once a year, so dont mind the extra work.

  1. deploy clean new fusion install using your usual method
  2. grab a backup from your old server, I use the generic fusion backup script thats on the website, I uncomment the line so it creates a package with everything in - upload to new server and extract, dont overwrite any of the new server stuff
  3. get new server db password
    cat /etc/fusionpbx/config.conf | grep password
  4. get backup db file location from extracted file, i.e /home/admin/var/backups/fusionpbx/postgresql
  5. create a restore script, input password from step 3 and sql file location from step 4

  6. Code:
    nano restore.sh
    
    #!/bin/sh
    database_host=127.0.0.1
    database_port=5432
    export PGPASSWORD="INSERT new server db password here"
    
    #remove the old database
    psql --host=$database_host --port=$database_port --username=fusionpbx -c 'drop schema public cascade;'
    psql --host=$database_host --port=$database_port --username=fusionpbx -c 'create schema public;'
    #restore the database
    pg_restore -v -Fc --host=$database_host --port=$database_port --dbname=fusionpbx --username=fusionpbx PATH TO SQL BACKUP HERE
    
    #restart freeswitch
    systemctl service freeswitch restart
    echo "Restore Complete";
  7. chmod +x restore.sh and run script
  8. reboot server
  9. update db schema, run twice
    cd /var/www/fusionpbx
    php /var/www/fusionpbx/core/upgrade/upgrade.php
  10. login with U & P from your old install
  11. login to GUI and run all GUI updates
  12. copy recordings, VM recordings etc

    cd /home/admin/var/lib
    cp -R freeswitch /var/lib
  13. reboot server
Here is how to update the FusionPBX dashboard, from Mark

  • Login to the web interface
  • From the dashboard press the SETTINGS button.
  • If you changed the groups assigned in the Dashboard.
    • Then print the page and save it to a PDF for reference later.
  • Select the first checkbox this will select all the ones below it.
  • Then press the DELETE button
  • Then go to the Menu and press Advanced then click on Upgrade.
  • Put a checkmark in App Defaults then press the Execute
 
Last edited: