[pbs-devel] [PATCH v3 proxmox-backup 08/20] datastore: ignore trashed snapshots for last successful backup

Christian Ebner c.ebner at proxmox.com
Tue May 13 15:52:35 CEST 2025


Exclude trashed snapshots from looking up the last successful backup
of the group, as trashed items are marked for deletion by the next
garbage collection run and must be considered as if not present
anymore.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 pbs-datastore/src/backup_info.rs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_info.rs
index 53acc5baf..ca0c4bc55 100644
--- a/pbs-datastore/src/backup_info.rs
+++ b/pbs-datastore/src/backup_info.rs
@@ -175,8 +175,13 @@ impl BackupGroup {
                     return Ok(());
                 }
 
-                let mut manifest_path = PathBuf::from(backup_time);
-                manifest_path.push(MANIFEST_BLOB_NAME.as_ref());
+                let path = PathBuf::from(backup_time);
+                let trash_marker_path = path.join(TRASH_MARKER_FILENAME);
+                if trash_marker_path.exists() {
+                    return Ok(());
+                }
+
+                let manifest_path = path.join(MANIFEST_BLOB_NAME.as_ref());
 
                 use nix::fcntl::{openat, OFlag};
                 match openat(
-- 
2.39.5





More information about the pbs-devel mailing list