(feature) Link rsync logs from backup run detail

Record the final rsync log path for successful real backup runs, matching
the existing dry-run and failure result payloads.

Add a staff-only run log endpoint and surface the link on run detail pages,
including fallback log discovery for older runs based on snapshot_path.

Cover direct log links and inferred scheduled backup logs with view tests.
This commit is contained in:
2026-05-20 00:09:59 +02:00
parent f41e59e695
commit 0babc57f57
6 changed files with 85 additions and 0 deletions

View File

@@ -242,6 +242,7 @@ class RunScheduledConfigSourceTests(SimpleTestCase):
meta_text = meta_path.read_text(encoding="utf-8")
self.assertTrue(result["ok"])
self.assertEqual(result["log"], str(Path(result["snapshot"]) / "meta" / "rsync.log"))
self.assertEqual(result["stats"]["rsync"]["files_total"], 10)
self.assertEqual(result["stats"]["rsync"]["files_transferred"], 2)
self.assertEqual(result["stats"]["rsync"]["link_dest_estimated_savings_bytes"], 1500)