SOLVED db restore & upgrade brakes auto prov

Status
Not open for further replies.

s2svoip

Member
Dec 9, 2019
254
7
18
44
Ive been testing restoring my db to a new server with v5 of fusion on debian 11, the db backup is from 4.5.20. after the restore, I run the fusion upgrade twice and reboot - everything seams good, but auto-provisioning does not work anymore. I test it before the db restore and it works, but after I just get 404 when I go to /app/provision/ - all my settings are 100% correct from the 4.5.20 server where it works just fine - cant see anything in the logs except 404 errors, anything else anyone could think i should check ?
 

s2svoip

Member
Dec 9, 2019
254
7
18
44
Does anyone have any tips of how to dive deeper into the auto provisioning process, any more logs I can check?
 

hfoster

Active Member
Jan 28, 2019
674
80
28
34
It's a big fat PHP class that takes a HTTP request, checks for things like user-agent, MAC address, and builds files appropriately. It's quite a difficult one to pin-point issues as so much happens at once.

The index.php returns a 'dummy' 404 error for a few things that are wrong like if provisioning is enabled, checking cidr ranges if enabled

Just hope you have something in /var/log/nginx/error.log
 

s2svoip

Member
Dec 9, 2019
254
7
18
44
bingo, thanks hfoster. nothing was in that log, but your pointer about cidr was helpfull. under provision theres the cidr setting, in my 4.5.20 install its set to true, and provisioning works just fine, however with it set to true in 5.0.5 you get 404 error, I set that to false and it works perfectly once again - so interesting, its almost as if it ignores the setting in 4.5.20 - could be a documented bug?

thanks for that.
 

Robert Birch

Member
Mar 16, 2017
111
4
18
52
Just wondering if this is in production and working for you?
I want to do the same thing: Build a new server and move everything onto it, rather than upgrade from 4.5.xx to 5.
Did you have multiple tenants on your old server?

Thanks
 

s2svoip

Member
Dec 9, 2019
254
7
18
44
so far yeah its been fine, I am using it on my dev server which just hosts my own phone system and some test tenants, but no reported issues so far - but cant say I have extensively tested features. i have multi teannants setup but not in use, just the one.
 

s2svoip

Member
Dec 9, 2019
254
7
18
44
heres my steps, sure there is a better way, I am not so linux proficient

1) clean install on new server
2) copy db backup from old server in var\backups\fusionpbx\postgresql
3) then i use just the dbrestore part of the backup script - let me know if you want this - you need the db password of the new install obv to do this
4) add new server IP to access controls > domains
5) then run upgrade from cmd line at least twice
cd /var/www/fusionpbx
php /var/www/fusionpbx/core/upgrade/upgrade.php
php /var/www/fusionpbx/core/upgrade/upgrade.php
6) reboot
7) edit ext-rtp-ip and sip-ip if you running behind nat like i am

This worked for me. Credit to @Adrian Fretwell for his help and @hfoster for his above in this thread
 
Status
Not open for further replies.