Ok - I am filing this under Endpoint Manager, because it’s what is causing the problem.
I have been struggling to use the Backup/Restore function on FreePBX 15 because I have about 30 machines to move from our own Hosting to Vultr - I finally got a machine to restore properly (with a little help - that is what needs fixing!).
Procedure I am using is the same every time:
On the old machine:
yum update -y
fwconsole ma upgradeall
Apply
fwconsole restart
Backup
On the new machine:
fwconsole sysadmin activate ID
yum update -y
fwconsole ma upgradeall
asterisk-version-switch (the .ISO on Vultr is out of date - we are running 18 on everything)
Apply
fwconsole restart
fwconsole backup --restore backup
So that is what I did on this machine - but once again, Endpoint threw and error (and didn’t restore correctly - it was empty) - Here is the error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘asterisk.endpoint_basefiles_211’ doesn’t exist on line 246 of file /var/www/html/admin/libraries/BMO/Database.class.php
Bummer - run the restore again just to make sure it wasn’t a fluke - same thing.
So, from my spelunking here: After restore to new home, can't install Zulu or Sangoma Connect - Commercial Modules / Sangoma Connect - FreePBX Community Forums I went and looked in the Asterisk database on MySQL on the Old machine and on the new - table exists on the Old machine, but not on the new!
mysqldump asterisk endpoint_basefiles_211 > endpoint_basefiles_211.sql
on the old machine and then
mysqldump asterisk < endpoint_basefiles_211.sql on the new machine and then try the restore again.
Progress - New error this time:
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘asterisk.endpoint_buttons_211’ doesn’t exist on line 246 of file /var/www/html/admin/libraries/BMO/Database.class.php
Alright - look again in MySQL and the table is present on the old, but not the new, so export/import again and then execute the restore one last time - Bingo!
Everything is restored and happy and where it should be!!!
I don’t know exactly why this is failing on almost all my machines, but I would guess that it relates to the following:
-
Almost all of my machines have been in service for at least 3 years + - many of them, even more than that - which means a lot of them were FreePBX 13 (or earlier) and then upgraded multiple times.
-
I am guessing that the old Endpoint Manager stored it’s info in tables that the new EPM is not looking for/creating/maintaining and that’s why it’s borking out.
What I don’t understand is why it is crashing on the restore when it correctly backed it up? I thought 15 Backup was supposed to be smarter than that!
Oh well - On to moving my machines now that I CAN use Backup and Restore (with a little help from the CLI)