https://docs.fusionpbx.com/en/latest/getting_started/restore.html is official public documentation but makes a few assumptions of where backup is coming from.
The important part is to have a working fresh install then extract backup files in place of default install then restore database
Code:
tar -xvpzf /var/backups/fusionpbx/backup_filename.tgz -C /
Code:
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 /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql
#restart freeswitch
service freeswitch restart
The pg_restore command above needs proper database host/port and file name of the database backup to work.