My system is still working, but the disk is over 90% full (3 GB on a 4GB SD card). I found some support online that suggested running pihole flush and setting MAXDBDAYS=14, which I've done. I also found another thread that said doing that should purge the logs after some time.
But it's been several hours and I’m still over 90% full. The largest files are:
For a system using the standard apt package manager, I'd usually recommend to clean the apt package cache by any unused versions of downloaded packages or completely, which will often free a few hundred megabytes.
In your case, your disk utilisation suggests that Ubuntu's proprietary snap packet manager would claim about 270 MB for caching.
I'm not familiar with snap, but I assume that it would also offer a way clearing its cache.
You should consider Ubuntu's support forums for details.
Note that this option doesn't control file size directly - it rather defines the maximum retention period that Pi-hole will store in its database.
If your Pi-hole would process a million evenly distributed queries in 28 days, the file would grow large enough to hold about 500,000 entries for your 14 days.
And if your Pi-hole would process those million queries in an hour, the database size would still grow proportionally for the full amount.
So while your option will result in the database holding only the data for the last 14 days (and thus may well prevent a fresh database file to not grow over a certain limit), it won't change the size of a database file that has grown to a certain size already.
Huh, it's just Raspbian, I thought that was just Debian. But thanks for the tips! Alas, vacuuming resulted in Error: database or disk is full. I'll have to find a way to make more room to allow it to finish.
Ubuntu and Raspbian would both be based on Debian.
I wasn't assuming you'd run Ubuntu, though - rather that you are using Ubuntu's or rather Canonical's snap package management tool, which is available for some Linux distributions apart from Ubuntu itself.
Perhaps you've installed snap when follwing some guide to install additional software on your system (maybe Docker, if we go by your above output)?
You might consider a bigger card. A 32GB is quite inexpensive. It has plenty of room and likely greater lifespan due to increased write locations for wear leveling.
Honestly I don't remember how I built this Pi Hole. I’m pretty sure I followed the directions on the website, but if it told me to install the latest Raspbian and then install Pi-Hole, or if it gave me a whole ready-made image, I don't recall.
Yeah, that's probably fine. I only ever look at the query log to see if a blocked request is breaking a website I'm trying to use. Thanks!