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 6E7A71FF0B0 for ; Fri, 09 Oct 2026 16:55:13 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id B070A2163C; Fri, 09 Oct 2026 16:55:11 +0200 (CEST) From: Jonas Theisen To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup v3 09/10] api: create datastore: allow creation without prune job Date: Fri, 9 Oct 2026 16:54:40 +0200 Message-ID: <20261009145445.282494-7-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261009145445.282494-1-j.theisen@proxmox.com> References: <20261009145445.282494-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791557705882 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.153 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: DE2QX5AB2JW4VDITRB4NXRB4RFIBGSW3 X-Message-ID-Hash: DE2QX5AB2JW4VDITRB4NXRB4RFIBGSW3 X-MailFrom: j.theisen@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: To allow users to create datastores without a prune job this patch adds an optional flag to the API call. If it is set no prune job will be generated. Signed-off-by: Jonas Theisen --- src/api2/config/datastore.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs index f3644149e..76988f592 100644 --- a/src/api2/config/datastore.rs +++ b/src/api2/config/datastore.rs @@ -262,6 +262,12 @@ pub(crate) fn do_create_datastore( default: false, description: "Overwrite in use marker (S3 backed datastores only)." }, + "prune-disable": { + type: Boolean, + optional: true, + default: false, + description: "Do not create a prune job for the new datastore." + }, }, }, access: { @@ -274,6 +280,7 @@ pub fn create_datastore( config: DataStoreConfig, reuse_datastore: bool, overwrite_in_use: bool, + prune_disable: bool, rpcenv: &mut dyn RpcEnvironment, ) -> Result { let lock = pbs_config::datastore::lock_config()?; @@ -311,7 +318,7 @@ pub fn create_datastore( } let mut prune_job_config = None; - if config.keep.keeps_something() || !has_prune_job(&config.name)? { + if !prune_disable && (config.keep.keeps_something() || !has_prune_job(&config.name)?) { prune_job_config = config.prune_schedule.as_ref().map(|schedule| { let mut id = format!("default-{}-{}", config.name, Uuid::generate()); id.truncate(32); -- 2.47.3