From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id D09441FF0AF for ; Fri, 06 Nov 2026 18:23:25 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 535A62162C; Fri, 06 Nov 2026 18:23:07 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v2 12/43] config/tools: add new fields for sync and snapshot/datastore list items Date: Fri, 6 Nov 2026 18:22:04 +0100 Message-ID: <20261106172235.890542-13-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261106172235.890542-1-c.ebner@proxmox.com> References: <20261106172235.890542-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793985774772 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.477 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HIVQRG2JBLHA7CHKTQPMPXH65Y4CL6JV X-Message-ID-Hash: HIVQRG2JBLHA7CHKTQPMPXH65Y4CL6JV X-MailFrom: c.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The sync job config gained an optional retention-timespan parameter and the snapshot list items now return an optional retain-until timestamp in the API types. For the datastore, optionally the default and maximum retention time are now exposed. Fix builds by adding the fields, leaving them to their empty default until used when required in subsequent changes. Signed-off-by: Christian Ebner --- src/api2/admin/datastore.rs | 4 ++++ src/api2/config/sync.rs | 2 ++ src/tools/mod.rs | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 3ba25934f..51dae4698 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -727,6 +727,8 @@ pub async fn status( counts, backend_type, s3_statistics, + default_retention_timespan: None, + max_retention_timespan: None, } } else { DataStoreStatus { @@ -737,6 +739,8 @@ pub async fn status( counts, backend_type, s3_statistics, + default_retention_timespan: None, + max_retention_timespan: None, } }) } diff --git a/src/api2/config/sync.rs b/src/api2/config/sync.rs index 2afd68898..980689781 100644 --- a/src/api2/config/sync.rs +++ b/src/api2/config/sync.rs @@ -876,6 +876,7 @@ acl:1:/remote/remote1/remotestore1:write@pbs:RemoteSyncOperator worker_threads: None, active_encryption_key: None, associated_key: None, + retention_timespan: None, }; // should work without ACLs @@ -1071,6 +1072,7 @@ acl:1:/remote/remote1/remotealice1:alice@pbs:RemoteSyncOperator,RemoteSyncPushOp worker_threads: None, active_encryption_key: None, associated_key: None, + retention_timespan: None, }; let mut update_alice = SyncJobConfigUpdater { diff --git a/src/tools/mod.rs b/src/tools/mod.rs index ab624d7a6..e1916cc4b 100644 --- a/src/tools/mod.rs +++ b/src/tools/mod.rs @@ -151,6 +151,7 @@ pub(crate) fn backup_info_to_snapshot_list_item( size, owner, protected, + retain_until: None, }; } Ok(None) => (), @@ -178,6 +179,7 @@ pub(crate) fn backup_info_to_snapshot_list_item( size: None, owner, protected, + retain_until: None, } } -- 2.47.3