(Solved (Im an Idiot)) Problem with a restore.

Status
Not open for further replies.

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
Fresh in stall of Fusion on Debian 9.

Ran a restore and it ended with:
pg_restore: error: could not open input file "/var/backups/fusionpbx/postgresql/fusionpbx$": No such file or directory
Restore Complete

So checked if the files where there:

root@pbx:~# cd /var/backups/fusionpbx/postgresql
root@pbx:/var/backups/fusionpbx/postgresql# ls
fusionpbx_pgsql_2021-04-20.sql fusionpbx_pgsql_2021-04-21.sql fusionpbx_pgsql_2021-04-22.sql


Even tried another fresh install and got the same issue. Any Ideas?
 

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
Oh well looks like I had something wrong with the script I was using to restore i had the line
pg_restore -Fc --host=127.0.0.1 --dbname=fusionpbx --username=fusionpbx /var/backups/fusionpbx/postgresql/fusionpbx$

Searched through the forums again and found

pg_restore -Fc --host=127.0.0.1 --dbname=fusionpbx --username=fusionpbx /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql

Changed that line to that and it sorted the issue.
 
Status
Not open for further replies.