FYI FreePBX 15 Restore Module

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,083
Reaction score
2,602
Rumor has it that the latest FreePBX/IncrediblePBX 15 restore module will let you restore everything from a FreePBX/IncrediblePBX 13 backup that was made within the GUI.

To get this to work, you first will need to update the backup module to 15.0.8.32 in Incredible PBX 16-15.1 after logging into your server as root with SSH/Putty:
Code:
/root/gpl-install-fpbx backup
Next, make a backup using the GUI of Incredible PBX 13-13.10 and copy the backup file from /var/spool/asterisk/backup to your desktop PC.

Finally, in the IncrediblePBX 16-15.1 GUI, choose Admin -> Backup & Restore, click on the Restore tab, and upload the FreePBX 13 restore file from your desktop. Then follow your nose, and report your findings.

Two guys reportedly spent 9 months developing this so that it would do the necessary translations between the two FreePBX versions. Very slick if it works.

p.s. I haven't tried it yet.
 
Last edited:
  • Like
Reactions: atsak
Joined
Oct 26, 2013
Messages
60
Reaction score
22
Unfortunately it does not appear to work. My first attempt failed at Legacy.php line 132. I was able to get around that, however, my second attempt reports the restore was successful, but there is nothing there. After reloading FreePBX, there is no configuration information for Asterisk present.

I resorted to just manually entering the configuration by hand. This was actually from FreePBX 14, not 13.

I plan on trying to backup/restore from and to FreePBX 15 to see if that works. Will report my findings...

Thanks
 
Joined
Oct 26, 2013
Messages
60
Reaction score
22
Sorry Ward if I was not clear. I was trying to restore to a FreePBX 15 system using a restore file from FreePBX 14. I did however notice that I had an older version than 15.0.8.32 of the backup module, but attempts to update it indicated that I was already at the latest online version.

Anyway, I grabbed the new backup module from GitHub and tried again with the same results. Back to the drawing board. I will dig in and see if I can figure out why it doesn't work...

Thanks
 
  • Like
Reactions: wardmundy

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
926
Reaction score
167
@wardmundy On IncrediblePBX-16-15, the FreePBX backup/restore module does not work at all. It does not allow the assignment of a storage location. The error messages indicate that a module named "filestore" is required to set the storage (and likely retrieval) location. I used the gpl-install-fpbx filestore command to attempt installation, but get XML parse errors. The filestore module appears in the module list but won't load / upgrade. It shows disabled pending upgrade. Attempts to upgrade fail.

I also downloaded the module to my PC, uploaded it as a manual install in FreePBX but I believe FreePBX wants access to its own library.

A basic FreePBX backup does not work because you cannot set a storage location and you cannot restore the backup made in IncrediblepbX13-13-10.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,083
Reaction score
2,602
Wish there was a quick fix, but I'm afraid that both guys who worked on this have left the employ of Sangoma for greener pastures. Wouldn't count on an update anytime soon... if ever.
 
  • Like
Reactions: dicko

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
644
Reaction score
234
A possible resolution is in the "developers corner" of

http://wiki.freepbx.org/

(oops, not working right now :) )

but once upon a time (like yesterday)

git clone ssh://[email protected]/freepbx/framework.git

then


git tag

and choose your branch for earlier versions if needed , worked for everything but xmpp because it is not there past 14:)

(you will need your public key in their git server first but thats in the above Catch-22 link)

you can get the latest but insupported xmpp from

git clone git://github.com/FreePBX/xmpp


you will also need a working mongod for a webrtc phone and a working mariadb odbc connector for cdr/cel reporting
 
Last edited:
  • Like
Reactions: wardmundy

Tonyclewis

New Member
Joined
Apr 25, 2019
Messages
4
Reaction score
1
@wardmundy On IncrediblePBX-16-15, the FreePBX backup/restore module does not work at all. It does not allow the assignment of a storage location. The error messages indicate that a module named "filestore" is required to set the storage (and likely retrieval) location. I used the gpl-install-fpbx filestore command to attempt installation, but get XML parse errors. The filestore module appears in the module list but won't load / upgrade. It shows disabled pending upgrade. Attempts to upgrade fail.

I also downloaded the module to my PC, uploaded it as a manual install in FreePBX but I believe FreePBX wants access to its own library.

A basic FreePBX backup does not work because you cannot set a storage location and you cannot restore the backup made in IncrediblepbX13-13-10.
You need to install that module as its required for the backup module in 15. Without it backup and restore wont work
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
926
Reaction score
167
You need to install that module as its required for the backup module in 15. Without it backup and restore wont work
I figured that but in the current incarnation of IncrediblePBX, I can't get that to work due to some missing dependencies.. I'm sure @wardmundy will be looking into this.
 
Joined
Oct 26, 2013
Messages
60
Reaction score
22
As a follow up, I was able to successfully execute a restore on FreePBX 15 from a FreePBX 15 backup. So staying on the same version seemed to work.

Now for the issue of trying to restore a FreePBX 14 backup file onto a FreePBX 15 system. Inside the FreePBX 14 backup file are two SQL command files for restoring the database.

Anyway, one of the SQL command files creates a table and gets a syntax error when trying to insert values into the table:
Code:
INSERT INTO `ampusers` VALUES ('admin','xxxxxxxxxxxxxxxxxxxxxxxxxxx','','','',_binary '*');SQLSTATE[HY000]: General error: 1 near "'*'": syntax error
Perhaps someone here is a little more versed in SQL/PHP that could advise on the proper syntax...
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,083
Reaction score
2,602
I figured that but in the current incarnation of IncrediblePBX, I can't get that to work due to some missing dependencies.. I'm sure @wardmundy will be looking into this.
Here is the backup & restore fix for Incredible PBX 16-15 including the filestore module...
Code:
cd /root
wget http://incrediblepbx.com/newbackup16-15.tar.gz
tar zxvf newbackup16-15.tar.gz
rm -f newbackup16-15.tar.gz
./install-backup
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
926
Reaction score
167
That did fix the backup/restore and filestore module issues but it won't restore the FreePBX 13 backup file. I could save a FreePBX 15 backup but when I try to restore the FreePBX 13 backup it starts and then while importing the database, it aborts on a comment line of some sort. In the process, it wiped out the CDR file but did not seem to mess up anything else.

Perhaps David Foxworth will have better luck.
 
  • Like
Reactions: wardmundy

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
644
Reaction score
234
Always good to know what the 'comment line of some sort' might be.
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
926
Reaction score
167
Code:
Running with: /usr/sbin/fwconsole backup --restore='/var/spool/asterisk/backup/uploads/20190721-090940-1563714580-13.0.195.28-2142008494.tgz' --transaction='38b9679d-f0d3-4b81-a872-a6460810eb3f'
Determining backup file type...type is legacy
Starting restore job with file: /var/spool/asterisk/backup/uploads/20190721-090940-1563714580-13.0.195.28-2142008494.tgz
Extracting backup...
Backup extracted to /tmp/backup/38b9679d-f0d3-4b81-a872-a6460810eb3f. These files will remain until a new restore is run or until cleaned manually.
Loading manifest to memory
Loading astdb to memory
Parsing out SQL tables. This may take a moment depending on backup size.
Found 2 database files in the backup.
File named: /tmp/backup/38b9679d-f0d3-4b81-a872-a6460810eb3f/mysql-2.sql.gz
Detected file /tmp/backup/38b9679d-f0d3-4b81-a872-a6460810eb3f/mysql-2.sql.gz as the PBX (Asterisk) database. Attempting restore
Extracting supplied database file mysql-2.sql.gz
Loading supplied database file mysql-2.sql
SQLSTATE[HY000]: General error: 1 near "COMMENT": syntax error
FreePBX then shows a banner that restore is complete.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
644
Reaction score
234
You would need to look at the content of mysql-2.sql and figure it out, you could also post a bug report , but without supportive documentation, you will likely be ignored :)
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
926
Reaction score
167
You would need to look at the content of mysql-2.sql and figure it out, you could also post a bug report , but without supportive documentation, you will likely be ignored :)
I gave it the college try. I had already done bulk export and import for my test IncrediblePBX 16-15.1 system. I just wanted to test whether the conversion of a FreePBX backup could be easily made to work. Obviously, it did not. I'll stick with my pedantic but tried and true methods. Those with more interest and patience than I can continue to debug the FreePBX backup/restore module.
 
  • Like
Reactions: dicko

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,083
Reaction score
2,602
@kenn10 I'm wondering if updating backup on the Incredible PBX 13-13 platform might help? Just a thought.

gpl-install-fpbx backup
 
Joined
Oct 26, 2013
Messages
60
Reaction score
22
Hi Kenn10,

I posted the error that I received, and while not the same spot you received an error, it was in the same mysql-2.sql file. The backup/restore works when staying with the same version of FreePBX, but unfortunately it appears to be non-functional if you try different versions of FreePBX. The FreePBX blog indicates they were able to successfully restore using an older version of FreePBX backup file, however, it appears that was probably some specific case.

I bit the bullet and manually entered the configuration information into my fresh install of FreePBX 15. It does look like I can backup/restore as long as it is the same version. Not sure if it would be worthwhile to file a bug report, as I am not sure if backup/restore from different versions of FreePBX is officially supported.

Thanks
 

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,320
Messages
137,026
Members
14,550
Latest member
treimers