Remote backup and restore

Status
Not open for further replies.

Low

New Member
Apr 15, 2021
2
1
3
I've been struggling for quite awhile on trying to get the fusionpbx-restore script to work correctly. Few issues I've run into (perhaps unique to my install?) such as the need to install rsync or the need to update the db_password in config.php. I've been following this document:

Is there a more detailed restore KB out there?

At this point I'm still stuck, my script connects to the production server, completes the remote backup, transfer the needed files, I then updated the db_password. Restarted the services. But getting the following message when I try to connect to the GUI:

error: SQLSTATE[08006] [7] FATAL: password authentication failed for user "fusionpbx" FATAL: password authentication failed for user "fusionpbx"

Thank you
 

hfoster

Active Member
Jan 28, 2019
677
80
28
34
You'll probably need to make sure the password (and other creds) match up in: /etc/fusionpbx/config.php. If you can connect to the PGSQL database using those credentials in config.php then it should be fine.

You might have to get a bit familiar with PGSQL's commands for listing users, permissions, adding and removing users, etc.
 

ad5ou

Active Member
Jun 12, 2018
884
197
43
As mentioned, your database and/or config.php passwords are not matching up properly.
I'm fairly sure the default backup script also backs up /etc/fusionpbx so a standard restore would overwrite the existing config.php.
If your database user credentials are the same on both servers, then it makes things a bit easier since config.php will still be correct.

Another fairly simple fix is to modify your restore script to copy or move the /etc/fusionpbx/config.php to a safe location before the backup files are restored, then move it back to original location to overwrite the restored copy with incorrect DB password.
 
  • Like
Reactions: robvandenbulk

robvandenbulk

Member
Mar 28, 2020
82
10
8
60
I've been struggling for quite awhile on trying to get the fusionpbx-restore script to work correctly. Few issues I've run into (perhaps unique to my install?) such as the need to install rsync or the need to update the db_password in config.php. I've been following this document:

Is there a more detailed restore KB out there?

At this point I'm still stuck, my script connects to the production server, completes the remote backup, transfer the needed files, I then updated the db_password. Restarted the services. But getting the following message when I try to connect to the GUI:

error: SQLSTATE[08006] [7] FATAL: password authentication failed for user "fusionpbx" FATAL: password authentication failed for user "fusionpbx"

Thank you
 

Attachments

  • restore.txt
    3.3 KB · Views: 19
Status
Not open for further replies.