Asterisk/MariaDB database and call recording storage archive

Hello,

FreePBX 16/Asterisk 18.16.0

My Asterisk/MariaDB database and call recording storage is growing very fast with the volume of calls handled by our server, my plan is to install a secondary server and move all data older then 3 months to the secondary server.

How can I export and import all Data Records (CDR), Call Event Log (CEL) and call recordings from the primary to secondary server?
How can I defrag the MariaDB database to regain the disk space?

Clifford

Would you please post some more information about your drive partition layout, eg.

df -h --total | tr -s '[:blank:]' | sed -e 's/^/|/' -e 's/ /|/g' -e 's/$/|/g' | sed '2i|-|-|-|-|-|-|-|'

…which makes for a pretty forum-markdown table format.

For the friendliest FreePBX GUI option, you might want to try the Backup & Restore module.

For some more control, there’s the FreePBX Backup & Restore module command-line utilities.

Digressing a bit, but another command-line way to do it might include maria-dump and rsync, which would perhaps be the best choices if your target “secondary server” is not running FreePBX (wasn’t clear from your post.)

Have you looked into the OPTIMIZE TABLE SQL command ?

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