Moving CDR and CEL from FreePBX 16 to 17

I need to migrate CDRs and CEL records from FreePBX 16 to FreePBX 17.
However, my new server already has existing CDRs that I do not want to lose.
Could you please provide me with a proper guide on how to accomplish this?

Hi Team,

I try to import the cdrs from Freepbx 16 to 17 and get this error.

I used this command to export on FreePBX 16:

mysqldump --skip-add-drop-table --no-create-db --no-create-info --complete-insert -u freepbxuser -p asteriskcdrdb cdr > cdr.sql
mysqldump --skip-add-drop-table --no-create-db --no-create-info --complete-insert -u freepbxuser -p asteriskcdrdb cel > cel.sql

root@pbx:/usr/local# mysql -uroot asteriskcdrdb < cdr.sql
ERROR 1136 (21S01) at line 23: Column count doesn't match value count at row 1
root@pbx:/usr/local#

In the mysql shell on both old and new machine, do
``
describe cel;
describe cdr;

You will need to 'ALTER TABLE . . .'  appropriately

Alter table on where ? and are there any complications or impact on the new server database?

Alter the tables so the two databases agree on schema temporarily , lets see your ‘descriptions’ first

New Server(FreePBX 17) column Names:

image

old PBX (FreePBX 16)
image

Would you like me to do a line by line coparison for you or do you feel up to the job yourself ? :wink:

:slight_smile:

if you can do I really appreciate it :slight_smile:

You add ed the last two user1 and outbound_prefix of what use I don’t know easiest way is to alter the table on NEW by adding those two columns, importimg, then deleting them if you want to .

https://dev.mysql.com/doc/refman/8.4/en/alter-table.html

2 Likes

Thanks @dicko

I have altered the table on new FreePBX 17 and imported successfully.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.