Hi. I have been using FusionPBX at ASW Market Place for few months now. My disk is just 8GB on a t2.micro The space is critical due to CDR information recorded on the database.
Question : How do I remove cdr recorded on the database?
Something like following would work for MYSQL
#!/bin/sh
/usr/bin/mysql -u root fusionpbx -e "DELETE FROM v_xml_cdr WHERE DATE(start_stamp) <= DATE(SUBDATE(NOW(),365))";
But we have SQLite database.
Thank you. Guy.
Clear records from xml_cdr
Re: Clear records from xml_cdr
You would do the following for sqlite database. Let me know if that works.
Code: Select all
sudo su
sqlite3 /var/www/html/fusionpbx/secure/fusionpbx.db "DELETE FROM v_xml_cdr WHERE DATE(start_stamp) <= DATE(SUBDATE(NOW(),365))"
Re: Clear records from xml_cdr
Hi,
Thank you for your previous reply.
My SQLITE fusionpbx.db is over 1TB.
I have followed your instructions today and DELETE FROM v_xml_cdr;
It deleted the call records (no old call records displayed in "Call Detailed Records" in FusionPBX).
But it made no changes to the size of the database. I can not explain why.
I was hoping if you could help me out with reducing the size of the Database.
My PBX is running on AWS, on a Fusionpbx from Netspectrum.
Thank you. Kind Regards, Guy.
Thank you for your previous reply.
My SQLITE fusionpbx.db is over 1TB.
I have followed your instructions today and DELETE FROM v_xml_cdr;
It deleted the call records (no old call records displayed in "Call Detailed Records" in FusionPBX).
But it made no changes to the size of the database. I can not explain why.
I was hoping if you could help me out with reducing the size of the Database.
My PBX is running on AWS, on a Fusionpbx from Netspectrum.
Thank you. Kind Regards, Guy.
Re: Clear records from xml_cdr
You would need to execute "vacuum" command. See more details at this link, http://stackoverflow.com/questions/2143 ... from-table.
Re: Clear records from xml_cdr
Thank you very much. That fixed it.
Return to “General discussion”
Who is online
Users browsing this forum: No registered users and 2 guests