From 9af1e907c7d2abb2536229d7283638efbdb52939 Mon Sep 17 00:00:00 2001 From: gradecke Date: Mon, 16 Dec 2024 14:18:35 +0100 Subject: [PATCH] remove baked agents from backups with no-agents or -N --- omd/packages/omd/omdlib/backup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/omd/packages/omd/omdlib/backup.py b/omd/packages/omd/omdlib/backup.py index 192a4ef2e05..cc640821533 100644 --- a/omd/packages/omd/omdlib/backup.py +++ b/omd/packages/omd/omdlib/backup.py @@ -94,6 +94,9 @@ def get_exclude_patterns(options: CommandOptions) -> list[str]: excludes.append("var/pnp4nagios/states/*") excludes.append("var/check_mk/rrd/*") + if "no-agents" in options or "no-past" in options: + excludes.append("var/check_mk/agents/*") + if "no-logs" in options or "no-past" in options: # Logs of different components excludes.append("var/log/*.log")