5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-02-09 09:57:40 +03:00

api: sync job: log stats for removed vanished entities

Extend the current task log summary to include a log entry stating the
number of removed because vanished on the source side snapshots,
backup groups and namespaces.

The additional task log line states, e.g.:
> Summary: removed vanished: snapshots: 2, groups: 1, namespaces: 0

The log line is not shown if the sync jobs `remove_vanished` flag was
not set and therefore no removed vanished stats are present.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Christian Ebner 2024-03-08 14:01:50 +01:00 committed by Thomas Lamprecht
parent ceb639bd0f
commit f4a8be4bab

View File

@ -161,6 +161,16 @@ pub fn do_sync_job(
task_log!(worker, "Summary: sync job found no new data to pull");
}
if let Some(removed) = pull_stats.removed {
task_log!(
worker,
"Summary: removed vanished: snapshots: {}, groups: {}, namespaces: {}",
removed.snapshots,
removed.groups,
removed.namespaces,
);
}
task_log!(worker, "sync job '{}' end", &job_id);
Ok(())