Copy logs on upgrade

This commit is contained in:
themylogin
2024-01-30 15:36:38 +01:00
parent d69fa45d3c
commit 8b9eca2d60

View File

@@ -464,6 +464,15 @@ def main():
"home"
])
try:
logs = os.listdir(f"{old_root}/var/log")
except Exception:
pass
else:
for log in logs:
if log.startswith(("failover.log", "fenced.log", "middlewared.log")):
rsync.append(f"var/log/{log}")
run_command([
"rsync", "-aRx",
"--exclude", "data/factory-v1.db",