[pbs-devel] [PATCH v3 proxmox-backup 09/20] sync: ignore trashed snapshots/groups when reading from local source
Christian Ebner
c.ebner at proxmox.com
Tue May 13 15:52:36 CEST 2025
Trashed snapshots and backup groups should never be synced, so filter
them out when listing the contents to be synced.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
src/server/sync.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/server/sync.rs b/src/server/sync.rs
index 09814ef0c..a32c914ff 100644
--- a/src/server/sync.rs
+++ b/src/server/sync.rs
@@ -447,6 +447,7 @@ impl SyncSource for LocalSource {
Some(owner),
)?
.filter_map(Result::ok)
+ .filter(|backup_group| !backup_group.is_trash())
.map(|backup_group| backup_group.group().clone())
.collect::<Vec<pbs_api_types::BackupGroup>>())
}
@@ -461,6 +462,7 @@ impl SyncSource for LocalSource {
.backup_group(namespace.clone(), group.clone())
.iter_snapshots()?
.filter_map(Result::ok)
+ .filter(|snapshot| !snapshot.is_trash())
.map(|snapshot| snapshot.dir().to_owned())
.collect::<Vec<BackupDir>>())
}
--
2.39.5
More information about the pbs-devel
mailing list