问题原文
原帖链接 · felwithe · CC BY-SA 4.0
Recently my backups have started failing, and I tracked the problem to the file /var/lib/fail2ban/fail2ban.sqlite3. It is over 500mb. I am not sure whether it has been growing over time or if this is a recent development.
How can I get it to a reasonable size and keep it that size? (For the purposes of this let's say under 500mb.)
社区高分解答
原帖链接 · neingeist · CC BY-SA 4.0
You can update to 0.11.x (which contains code to do the purge) and then delete the huge database followed by a restart of fail2ban. It will recreate the database. This is the easiest solution with no drawbacks for most people.
While fail2ban 0.11.x actually contains code to purge old entries (the older version did not!), it does no VACUUM. So another option is to wait for fail2ban to purge the old entries (happens every hour) and perform a manual sqlite3 /var/lib/fail2ban/fail2ban.sqlite3 "VACUUM;". Without the VACUUM the database file will stay at its size.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
