From da9dfcaf1895efaee2077079be8aa47eeb772a63 Mon Sep 17 00:00:00 2001 From: "Theodor S. Midtlien" Date: Wed, 20 May 2026 14:35:37 +0200 Subject: [PATCH] Correct corruption --- src/pages/help/troubleshooting-client.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/help/troubleshooting-client.mdx b/src/pages/help/troubleshooting-client.mdx index 924d2078..803cee24 100644 --- a/src/pages/help/troubleshooting-client.mdx +++ b/src/pages/help/troubleshooting-client.mdx @@ -96,9 +96,9 @@ a [github issue](https://github.com/netbirdio/netbird/issues/new/choose) and att ### Log rotation -NetBird rotates `client.log` itself by default — old files are written next to the active log as gzipped archives (e.g. `client-2025-04-01T12-00-00.000.log.gz`). The maximum size of the active file is controlled by [`NB_LOG_MAX_SIZE_MB`](/client/environment-variables#logging) (default: 15 MB). +NetBird rotates `client.log` itself by default, old files are written next to the active log as gzipped archives (e.g. `client-2025-04-01T12-00-00.000.log.gz`). The maximum size of the active file is controlled by [`NB_LOG_MAX_SIZE_MB`](/client/environment-variables#logging) (default: 15 MB). -Running NetBird's built-in rotation **and** the `logrotate` service for Linux on the same file causes problems: `logrotate` renames the file out from under the daemon, and the daemon keeps writing to the old file, so new entries land in the rotated file instead of `client.log` or corruption happens. +Running NetBird's built-in rotation **and** the `logrotate` service for Linux on the same file causes problems: `logrotate` renames the file out from under the daemon, and the daemon keeps writing to the old file. This results in `client.log` being corrupted with zero bytes and some logging lost. To avoid this, NetBird scans `/etc/logrotate.conf` and `/etc/logrotate.d/*` on Linux startup. If any non-comment line mentions `netbird`, the client logs a warning and disables its own rotation, letting `logrotate` own the file. You will see a line like this in `client.log`: