[Python-modules-team] Bug#933749: fail2ban: ever-growing fail2ban sqlite database
Mike Gerber
mike at mike-gerber.de
Sun Sep 13 11:50:13 BST 2020
Hi,
I have a number of Debian hosts that have these ever-growing fail2ban databases.
I tried to solve the problem by updating to 0.11.1-2 (the bullseye version).
Observations:
* Disk space usage DOUBLES by a backup copy of the database on upgrade:
total 574M
-rw------- 1 root root 300M Sep 13 12:43 fail2ban.sqlite3
-rw------- 1 root root 274M Sep 13 12:31 fail2ban.sqlite3.20200913-103150
* The database seems to be purged, observeable by using the sqlite3 binary
to open the database and querying SELECT COUNT(*) FROM bans. This seems
to happen every hour, so you have to be a little patient.
* It is however not VACUUMed, so it stays at its size.
So an update is definitely not enough. Deleting the backup copy and manually
VACUUMing (an hour after the update) is required too.
Mike
More information about the Python-modules-team
mailing list