PLEASE remember to post your full Vicidial Version with Build on all posts! (at a minimum: You should also post your full installer version, and arguably your SVN level)
essential log information
I'm assuming you meant "NONessential" log information. LOL.
- Code: Select all
# Clear the "daily use" mysql logs that are not used in reports after they are archived
23 22 * * * mysql asterisk -e "TRUNCATE vicidial_dial_log_archive" > /dev/null
24 22 * * * mysql asterisk -e "TRUNCATE vicidial_log_extended_archive" > /dev/null
26 22 * * * mysql asterisk -e "TRUNCATE vicidial_api_log_archive" > /dev/null
27 22 * * * mysql asterisk -e "TRUNCATE vicidial_carrier_log_archive" > /dev/null
* Note that you may need to add credentials to the mysql line depending on your mysql configuration (if the mysql "root" user has a password, for instance). You CAN alter these to truncate the NonArchive logs instead, but I recommend use of the archiving script instead. I try to avoid truncating the active/non-archive log tables directly. At least until the next day or two ... (in case they are actually needed once every year for real troubleshooting)
Have a look at the notes in the top of this script:
/usr/share/astguiclient/ADMIN_archive_log_tables.pl
There are some tables eligible for pruning. Others for archiving. You can then prune the archived tables beyond a specific date if you no longer need the information. This script will also optimize the log tables (which frees up space: deleting records does NOT unless you truncate). Managing your pruning/archiving/retention periods is a Good Practice for any database system with logs (often even for those without ... do you still need leads from 2012? LOL)
Happy Hunting!
