Restore FusionPBX

Follow the online instructions to create your backup on the old system (if it isn’t already doing so). You need the fusionpbx files backed up as well as the postgres database.

Copy the backup files to the top directory, not “/root” but just “/”.

Untar the fusionpbx file: tar -xvpzf /[fusionbackup].tgz -C /

Create a user called fusionpbx with a secure password. This will be a linux user, not the fusionpbx phone system user. To avoid issue with restoring, it is best to do this.

Sign in to linux as user fusionpbx.

Run postgres by typing ‘psql’. It shouldn’t ask for username or password since it uses the linux username.

Run command ‘drop schema public cascade;’. This will drop the database files created by the install program. Make sure to have semicolon so that postgres knows to run the command.

Run command ‘create schema public;’.

Run ‘psql -U fusionpbx -d fusionpbx -f [backupfile].sql’

You should see a bunch of statements go by about creating and updating the tables.

Get the fusionpbx password from /etc/fusionpbx/config.php.

Run postgres again by typing ‘psql’.

Run this command:  alter user fusionpbx with password ‘[password]’; Where the [password] is the password from the fusionpbx config file.

That should do it. You will want to check and make sure everything came over. Also, make sure you are managing the same domain as the old server (either by adding the ip address using the fusionpbx menu Advanced->Domains or better, by changing the machines ip address to the old server address).

This should allow you to have a new system up and running first without needing to take down the old system (maybe a minute or two downtime while you switch cables and do a final reboot of the new system). Just remember to change the new machine’s ip address AFTER disconnecting the old machine. Otherwise, they will conflict and cause problems.

Leave a Comment