GUI Restore - does it work?

Status
Not open for further replies.

niall

New Member
Apr 2, 2018
4
0
1
37
I'm trying to restore a backup file (466 MB) to a fresh install, following a hard drive failure on the previous installation.

When I try to restore via the GUI, the process keeps timing out.

Does the GUI Restore function actually work? Is there another method of restoring an old backup to a fresh install?

Thanks in advance for any suggestions.
 

niall

New Member
Apr 2, 2018
4
0
1
37
Thanks, that script refers to restoring from a server that is still functional. In my case, the old server is dead and inaccessible by SSH. I've just a backup file that I downloaded before the old server died, and I need to restore from that file.

Any suggestions?
 

ad5ou

Active Member
Jun 12, 2018
884
196
43
it should point you in the right direction.
Assuming you have a new server installed (using the same branch/version as the dead one) you can use parts of the script in the link I shared. Everything would need to be done via the console or terminal session.

Copy the backup file to the new server.
create and modify the script in the link I shared.
The main items you need in this scenario:
Code:
#!/bin/sh
#### modify line below to match your database password found in /etc/fusionpbx/config.php
export PGPASSWORD="zzz"

#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 with line below with correct name/path of "fusionpbx_pgsql_$now.sql" from your backup file
pg_restore -v -Fc --host=$database_host --port=$database_port --dbname=fusionpbx --username=fusionpbx /var/backups/fusionpbx/postgresql/fusionpbx_pgsql.sql

#restart freeswitch
service freeswitch restart
echo "Restore Complete";
You can ignore the remote backup stuff and rsync lines
 

ad5ou

Active Member
Jun 12, 2018
884
196
43
Forgot to add the line to actually extract your backup file.
tar -xvpzf /path/to/your/backup.tgz -C /

I would also move the items in your /etc/fusionpbx folder before extracting the backup.
 

niall

New Member
Apr 2, 2018
4
0
1
37
Thanks again for your help. I'll give it a try.

But in relation to the first part of my question - Does the GUI Restore function actually work?

There have been other unanswered threads on the forum in relation to the GUI Restore apparent non-functionality. It would be useful to know definitively if this function works or not.
 

ad5ou

Active Member
Jun 12, 2018
884
196
43
It can work, but usually the backup files are too large and take to long to process with default php and nginx settings.
 

niall

New Member
Apr 2, 2018
4
0
1
37
GUI Restore would be my preferred method, if it actually works. Any suggestions for what to tweak in the php and nginx config?
 
Status
Not open for further replies.