FYI FreePBX 15 Restore Module

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
@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
19,168
Reaction score
5,199
@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
19,168
Reaction score
5,199
Ooops. Just saw your post. We need some more logic if there are more than 2 INSERT INTOs.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
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
19,168
Reaction score
5,199
@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

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
@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
19,168
Reaction score
5,199
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
19,168
Reaction score
5,199
Already pushed out the fixes in latest newbackup16-15.tar.gz. Thanks for all your help, @kenn10. Open source development at its finest!!
 

Eliad

Active Member
Joined
Aug 13, 2017
Messages
619
Reaction score
127
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
19,168
Reaction score
5,199
What is the Incredible PBX version reported at the top of pbxstatus??
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
See also this link for the fix of the corrupted indications table which occurs with any restore from FreePBX 13.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
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.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
@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.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
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

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
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

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top