From 59abbda0240e9e21801135418436754779ffa7ef Mon Sep 17 00:00:00 2001 From: yubiuser Date: Tue, 21 Oct 2025 20:36:35 +0200 Subject: [PATCH] Add pihole logrotate command Signed-off-by: yubiuser --- docs/main/pihole-command.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/main/pihole-command.md b/docs/main/pihole-command.md index 26cabd2a2..e7b88fc8e 100644 --- a/docs/main/pihole-command.md +++ b/docs/main/pihole-command.md @@ -14,6 +14,7 @@ Pi-hole makes use of many commands, and here we will break down those required t | [Allowlisting, Denylisting and Regex](#allowlisting-denylisting-and-regex) | `pihole allow`, `pihole deny`, `pihole --regex`, `pihole --wild`, `pihole --allow-regex`, `pihole --allow-wild` | | [Debugger](#debugger) | `pihole debug` | | [Log Flush](#log-flush) | `pihole flush` | +| [Log Rotate](#log-rotate) | `pihole logrotate`| | [Repair](#repair) | `pihole repair` | | [Tail](#tail) | `pihole tail` | | [Set password](#password) | `pihole setpassword` | @@ -73,7 +74,17 @@ The Pi-hole debugger will attempt to diagnose any issues, and link to an FAQ wit | Script Location | [`/opt/pihole/piholeLogFlush.sh`](https://github.com/pi-hole/pi-hole/blob/master/advanced/Scripts/piholeLogFlush.sh) | | Example Usage | [`pihole flush`](https://discourse.pi-hole.net/t/the-pihole-command-with-examples/738#flushing-the-log) | -When invoked manually, this command will allow you to empty Pi-hole's log, which is located at `/var/log/pihole/pihole.log`. The command also serves to rotate the log daily, if the `logrotate` application is installed. +When invoked manually, this command will allow you to empty Pi-hole's logs, which are located at `/var/log/pihole/` and removed the last 24h from the long-term database. + +### Log Rotate + +| | | +| -------------- | -------------- | +| Help Command | N/A | +| Script Location | [`/opt/pihole/piholeLogRotate.sh`](https://github.com/pi-hole/pi-hole/blob/master/advanced/Scripts/piholeLogRotate.sh) | +| Example Usage | [`pihole logrotate`] | + +When invoked manually, this command will allow you rotate Pi-hole's logs, which are located at `/var/log/pihole/`. ### Repair