[pbs-devel] [RFC v2 proxmox-backup 05/21] sync: ignore trashed snapshots when reading from local source
Christian Ebner
c.ebner at proxmox.com
Thu May 8 15:05:39 CEST 2025
Trashed snapshots should never be synced, so filter them out when
listing the snapshots backup directories to be synced.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
src/server/sync.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/server/sync.rs b/src/server/sync.rs
index 09814ef0c..3de2ec9a4 100644
--- a/src/server/sync.rs
+++ b/src/server/sync.rs
@@ -461,6 +461,7 @@ impl SyncSource for LocalSource {
.backup_group(namespace.clone(), group.clone())
.iter_snapshots()?
.filter_map(Result::ok)
+ .filter(|snapshot| !snapshot.is_trashed())
.map(|snapshot| snapshot.dir().to_owned())
.collect::<Vec<BackupDir>>())
}
--
2.39.5
More information about the pbs-devel
mailing list