Moving ODBC CDR's to a new database server

Hi

I am using the cdr_adaptive_odbc module to store CDR’s in a database. I need to move this database to a new server but this means that the database will be unavailable for a period of time (1-2 hours).

My question is this: When the database becomes available again, will Asterisk automatically upload CDR’s for calls that have happened during the database outage? I have a mixture of Asterisk 1.8 & 11 servers.

TIA
farmorg

[quote=“farmorg, post:1, topic:67326”]
My question is this: When the database becomes available again, will Asterisk automatically upload CDR’s for calls that have happened during the database outage? I have a mixture of Asterisk 1.8 & 11 servers.
[/quote] NO

Normally CDR is written after all extensions are finished executing.

If you know you’re going to have a period of downtime, you could certainly use one of the CSV backends to dump the CDRs locally to a CSV file. You could then use something like MySQL’s LOAD DATA INFILE to load the CDRs into the database; if your backend doesn’t have a similar command, it would be relatively trivial to write a script that does this.

Or schedule some downtime and do it during the night :slight_smile:

2 Likes