So I logged into my website today and noticed that my storage space of 60GB was like 45% full. This seemed odd because I only have three websites only there and the biggest one is 2 or 3GB while the other two take up 1GB or less.
After doing some research, I noticed that the /var/log/mysql folder was filled with 100MB files that were eating up like 15GB of my storage. I continued doing research here and was lead to this thread
Which suggested I could just wipe out the whole folder because it’s just logs and unless I’m troubleshooting something immediately, there’s no need to have them stored for so long
So my question is, how can I automate this server so I don’t have to do this manually? It seems like it would be smart to keep some recent log files in the folder (I’m okay with storing 1GB of logs, or a few hundred MB or whatever).
But unless I notice something wrong, I shouldn’t need any of the older log files in this folder. Is there a recommended way of keeping this folder in check with EasyEngine?
If not, what would be the best Linux style way of keeping this folder clean? Maybe setting up a cronjob to wipe it clean once a month? Or is there something built into MariaDB, like a setting or something, that prevents the logs folder from reaching a certain size?