FYI FreePBX 15 Restore Module

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
943
Reaction score
177
@kenn10: Search in asteriskcdr1313.sql and see if there are more than 2 occurrences of "INSERT INTO." The first and last are what we are using to pull out the CDR and CEL data. Could it be that the mysqldump is creating more than two?? That's the only thing I can think of that would limit the extraction size.
You are correct. There are multiple INSERT INTO statements for both CDR and CEL. I guess the dump breaks the file into smaller chunks.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
@kenn10: Try changing the 2 lines after gunzip to the following. I think head and tail were the problem. BUT THIS WON'T WORK BASED UPON YOUR POST ABOVE.

Code:
cat asteriskcdr1313.sql | grep "INSERT INTO" | sed -n 1p > cdr1313.txt
cat asteriskcdr1313.sql | grep "INSERT INTO" | sed -n 2p > cel1313.txt
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
Ooops. Just saw your post. We need some more logic if there are more than 2 INSERT INTOs.
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
943
Reaction score
177
Ooops. Just saw your post. We need some more logic if there are more than 2 INSERT INTOs.
If I can figure out the correct syntax to make grep "INSERT INTO `cdr` " work, we could just use that to separate the CDR from the CEL.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
@kenn10: Try these two lines after the gunzip line:
Code:
cat asteriskcdr1313.sql | grep "INSERT INTO \`cdr\` VALUES" > cdr1313.txt
cat asteriskcdr1313.sql | grep "INSERT INTO \`cel\` VALUES" > cel1313.txt
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
943
Reaction score
177
@wardmundy Are we over complicating this? The cdr and cel live in the same database. Can we just do a bulk load and then alter the table to add the new database elements?

I just tried this: mysql -u root -ppassw0rd asteriskcdrdb < asteriskcdr1313.sql and it worked. I haven't done the alter yet. The CDR and CEL data imported correctly. Everything is there that should be.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
You end up with the wrong kind of database doing that. They may be using InnoDB features. Your big data worked for me with the change above.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
Already pushed out the fixes in latest newbackup16-15.tar.gz. Thanks for all your help, @kenn10. Open source development at its finest!!
 

Eliad

Member
Joined
Aug 13, 2017
Messages
171
Reaction score
24
I have and Incredible PBX 13.0.192.19 server which is running quite well. I tried to follow the instruction to back it up and restore it to 16-15. On the 13 I do not have the script for ./gpl-install-fpbx backup. Where do I get it from? What step am I missing?
Same question for another server version Incredible PBX 13.0.195.28
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
What is the Incredible PBX version reported at the top of pbxstatus??
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
See also this link for the fix of the corrupted indications table which occurs with any restore from FreePBX 13.
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
943
Reaction score
177
It looks like all the issues I reported to FreePBX regarding the restore have been pushed out to the next Spinrt which ends on 8/28/2019. That's not unreasonable if things don't keep getting pushed back. I'll be monitoring.
 
  • Like
Reactions: wardmundy

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
943
Reaction score
177
@wardmundy A number of issues with the FreePBX legacy restore have been resolved and the module can be updated from their edge repository. A number of reported issues have been pushed into September for fixes. The native FreePBX 15 backup/restore module is still not ready for prime time. I suggest we continue to use Ward's instructions and scripts to migrate from 13-13 to 16-15 until the FreePBX team works all the bugs out.
 
  • Like
Reactions: wardmundy

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
In its wisdom, Sangoma reportedly has blocked the original developers from contributing fixes so... this may take some time. Thanks for the update, @kenn10.
 

krzykat

Guru
Joined
Aug 2, 2008
Messages
1,541
Reaction score
415
Location
South Florida
In its wisdom, Sangoma reportedly has blocked the original developers from contributing fixes so... this may take some time. Thanks for the update, @kenn10.
WTF? Are you stating that an open sourced project whereby a private company had some of the developers on its payroll had an NDA that prevents them from assisting on the same open sourced project after their departure? If that is true, that is just so against the philosophy of open sourced projects IMHO.
 

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,367
Messages
137,355
Members
14,575
Latest member
Issue