How to reduce dialer database size by deleting logs

Small, clean database will always perform better than a huge one.

In order to see what is the total size of all the databases in the dialer, log in via SSH and run the following command:

du -kh /var/lib/mysql

To check the size of the asterisk database only, you can run:

du -kh /var/lib/mysql/asterisk

To delete logs, run the command below:

TRUNCATE `vicidial_user_log`;TRUNCATE `vicidial_monitor_log`;TRUNCATE `vicidial_log_extended_archive`;TRUNCATE `vicidial_log_extended`;TRUNCATE `vicidial_log_archive`;TRUNCATE `vicidial_log`;TRUNCATE `vicidial_email_log`;TRUNCATE `vicidial_email_list`;TRUNCATE `vicidial_did_log`;TRUNCATE `vicidial_dial_log`;TRUNCATE `vicidial_cpd_log`;TRUNCATE `vicidial_closer_log_archive`;TRUNCATE `vicidial_closer_log`;TRUNCATE `vicidial_carrier_log_archive`;TRUNCATE `vicidial_carrier_log`;TRUNCATE `vicidial_api_log_archive`;TRUNCATE `vicidial_api_log`;TRUNCATE `vicidial_agent_skip_log`;TRUNCATE `vicidial_agent_log_archive`;TRUNCATE `vicidial_agent_log`;TRUNCATE `vicidial_admin_log`;TRUNCATE `user_call_log`;TRUNCATE `recording_log`;TRUNCATE `park_log`;TRUNCATE `call_log_archive`;TRUNCATE `call_log`;TRUNCATE `callcard_log`;

Warning: You will not be able to recover the logs afterwards, meaning, all of your call logs will be permanently deleted after this.