Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-agents option to omd backup #777

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions omd/packages/omd/omdlib/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 7 additions & 1 deletion omd/packages/omd/omdlib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3862,7 +3862,13 @@ class Option(NamedTuple):
exclude_options = [
Option("no-rrds", None, False, "do not copy RRD files (performance data)"),
Option("no-logs", None, False, "do not copy the monitoring history and log files"),
Option("no-past", "N", False, "do not copy RRD files, the monitoring history and log files"),
Option("no-agents", None, False, "do not copy agent files created by the bakery"),
Option(
"no-past",
"N",
False,
"do not copy RRD files, agent files, the monitoring history, and log files",
),
]


Expand Down
Loading