Backup & Restore

Status
Not open for further replies.

Tricom114

New Member
Mar 29, 2017
21
2
1
45
I have followed the direction on Fusionpbx.com on how to do a database backup, but there isn't any information on how to restore your database backup. Or how to transfer your database to a new install. It is always a good idea to have a backup plan in place.

Following the directions from:
http://docs.fusionpbx.com/en/latest/getting_started/backup.html

I created a pg_dump file:
fusionpbx_pgsql_2017-04-18.sql

Now, I was able to find this information from another forum on how to do a restore
pg_restore -Fc --host=127.0.0.1 --dbname=fusionpbx --username=fusionpbx --schema=public /var/backups/fusionpbx_pgsql_2017-04-18.sql

So far it looks like it works pretty well. Make sure you have your database password. It can be found at:
/etc/fusionpbx/config.php

My main objective was to be able to import my data from an old build to a new install. So far it looks like this works for me. The only issue I have found is that it duplicates everything in variables, and it does not transfer your settings under Default Settings.

If anyone has any advice or input on migrating data from one server to another, please share.
 

manchelsi

New Member
May 1, 2017
2
0
1
37
pg_restore -c -U fusionpbx --host 127.0.0.1 -d fusionpbx /var/backups/fusionpbx_pgsql_2017-04-18.sql
 

bigfishvoice

New Member
Oct 14, 2016
6
0
1
54
If the database that you are restoring to is setup for BDR and the source data is coming from a database that doesn't have BDR setup, will doing this pg_restore break the BDR?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
If the database that you are restoring to is setup for BDR and the source data is coming from a database that doesn't have BDR setup, will doing this pg_restore break the BDR?

I personally do not use this backup method for any of my systems.

If I was using it on a BDR system, what I would do is stop postgres first with a service postgresql stop

Then do a tar -zcvf postgresql.tgz /var/lib/postgresql

Then service postgresql start

I successfully moved a BDR install from LXC to VMWare using this exact method less than a couple of days ago and it worked flawlessly.
 

bigfishvoice

New Member
Oct 14, 2016
6
0
1
54
I'm looking to move data from a non-BDR system to a new BDR cluster. Have any suggestions to do this without breaking the BDR? It's not for a regular backup solution, just to move data one time from an old server to a new cluster.
 

kobus.morgan

Member
Feb 1, 2017
38
1
8
39
Hi All,

I need to move our current Fusionpbx install (with BDR) to a new server cluster. Unfortunately, my postgresql knowledge is not good enough to be able to do this.

The few attempts that I did try it showed the amount of extensions on the dashboard. When I navigate to it though I only get a blank screen (under extension, devices, etc.)

Any information for this would be fantastic or least pointing me in the right direction.
 
Status
Not open for further replies.