I created a simple database maintenance script s9_cleandb_sh for s9y database tables. You can find it on github.
Here is the background (see also
Some database tables in serendipity tend to become very big with time. This is especially the case for logging only tables like spamblocklog and visitors.
The problem seems to be well known.
However I use the very simple approach to just call an external shell script to delete all entries older than a given date.
To use it:
- Place it in
- Create a MySQL client config file
my_cnf_dbcleanwith database, user and password information:
- And add the call
/usr/local/sbin/s9y_cleandb.sh /path/to/my_cnf_dbcleane.g to
I call it weekly, so that I don’t get annoyed by daily cron mail output, but can keep an eye on it on the other hand. Hopefully s9y soons gets an automated time based database maintenace mechanism…