From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup-qemu 4/8] submodules: bump proxmox-backup submodule to 4.2.5 and fix api changes
Date: Tue, 25 Aug 2026 11:17:36 +0200 [thread overview]
Message-ID: <20260825091741.162883-5-c.ebner@proxmox.com> (raw)
In-Reply-To: <20260825091741.162883-1-c.ebner@proxmox.com>
Bump the submodule to the latest version 4.2.5 and adapt to recent api
changes, which cover in particular:
- The archive name for guest configs which now has the stricter
BackupArchiveName type as introduced in [0].
- Keeping the signature check of a downloaded previous manifest, made
optional via a flag in [1].
Due to the stricter checks, add_config() now allows only client side
extensions for blobs and auto-expands the server side `.blob`
extension when required.
While at it, make sure to always use the latest stricter check by
depending on version 1.0.20, which is not strictly required here but
the submodule already depends on it as well and it protects against
building future versions with the still more relaxed archive name
parsing.
The api type changes affect internal API's only, public API's types
remain unchanged.
[0] https://git.proxmox.com/?p=proxmox-backup.git;a=commit;h=b57274a5a64791e7245bc0655ce0f133668db145
[1] https://git.proxmox.com/?p=proxmox-backup.git;a=commit;h=b80847b554be38f7a9bcae9bf09e14dfb64afa22
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
Cargo.toml | 2 +-
src/backup.rs | 6 ++++--
src/commands.rs | 17 +++++------------
submodules/proxmox-backup | 2 +-
4 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 2719a80..81c46b3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,7 +37,7 @@ proxmox-schema = { version = "5", features = [ "api-macro" ] }
proxmox-sortable-macro = "1"
proxmox-sys = "1"
-pbs-api-types = { version = "1" }
+pbs-api-types = { version = "1.0.20" }
pbs-client = { path = "submodules/proxmox-backup/pbs-client" }
pbs-datastore = { path = "submodules/proxmox-backup/pbs-datastore" }
diff --git a/src/backup.rs b/src/backup.rs
index cf1806a..9f1848b 100644
--- a/src/backup.rs
+++ b/src/backup.rs
@@ -2,6 +2,7 @@ use anyhow::{bail, format_err, Error};
use once_cell::sync::OnceCell;
use std::collections::HashSet;
use std::os::raw::c_int;
+use std::str::FromStr;
use std::sync::{Arc, Mutex};
use futures::future::{Either, Future, FutureExt};
@@ -10,7 +11,7 @@ use tokio::runtime::Runtime;
use proxmox_async::runtime::get_runtime_with_builder;
use proxmox_sys::fs::file_get_contents;
-use pbs_api_types::{BackupType, CryptMode};
+use pbs_api_types::{BackupArchiveName, BackupType, CryptMode};
use pbs_client::{BackupWriter, BackupWriterOptions, HttpClient, HttpClientOptions};
use pbs_datastore::BackupManifest;
use pbs_key_config::{load_and_decrypt_key, rsa_encrypt_key_config, KeyConfig};
@@ -157,7 +158,7 @@ impl BackupTask {
)
.await?;
- let last_manifest = writer.download_previous_manifest().await;
+ let last_manifest = writer.download_previous_manifest(true).await;
let mut result = 0;
if let Ok(last_manifest) = last_manifest {
result = 1;
@@ -186,6 +187,7 @@ impl BackupTask {
pub async fn add_config(&self, name: String, data: Vec<u8>) -> Result<c_int, Error> {
self.check_aborted()?;
+ let name = BackupArchiveName::from_str(&name)?;
let command_future = add_config(
self.need_writer()?,
diff --git a/src/commands.rs b/src/commands.rs
index 9b84966..3c2726c 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -94,15 +94,13 @@ async fn register_zero_chunk(
pub(crate) async fn add_config(
client: Arc<BackupWriter>,
manifest: Arc<Mutex<BackupManifest>>,
- name: String,
+ config_blob_name: BackupArchiveName,
data: Vec<u8>,
compress: bool,
crypt_mode: CryptMode,
) -> Result<c_int, Error> {
//println!("add config {} size {}", name, size);
- let blob_name = format!("{}.blob", name);
-
let options = UploadOptions {
compress,
encrypt: crypt_mode == CryptMode::Encrypt,
@@ -110,12 +108,11 @@ pub(crate) async fn add_config(
};
let stats = client
- .upload_blob_from_data(data, &blob_name, options)
+ .upload_blob_from_data(data, &config_blob_name, options)
.await?;
- let blob_name: BackupArchiveName = blob_name.parse()?;
let mut guard = manifest.lock().unwrap();
- guard.add_file(&blob_name, stats.size, stats.csum, crypt_mode)?;
+ guard.add_file(&config_blob_name, stats.size, stats.csum, crypt_mode)?;
Ok(0)
}
@@ -481,7 +478,7 @@ pub(crate) async fn finish_backup(
..UploadOptions::default()
};
let stats = client
- .upload_blob_from_data(rsa_encrypted_key, &target.to_string(), options)
+ .upload_blob_from_data(rsa_encrypted_key, target, options)
.await?;
manifest
.lock()
@@ -515,11 +512,7 @@ pub(crate) async fn finish_backup(
};
client
- .upload_blob_from_data(
- manifest.into_bytes(),
- &MANIFEST_BLOB_NAME.to_string(),
- options,
- )
+ .upload_blob_from_data(manifest.into_bytes(), &MANIFEST_BLOB_NAME, options)
.await?;
client.finish().await?;
diff --git a/submodules/proxmox-backup b/submodules/proxmox-backup
index b48af88..5f890fc 160000
--- a/submodules/proxmox-backup
+++ b/submodules/proxmox-backup
@@ -1 +1 @@
-Subproject commit b48af880bee8c654dff29ec2d64b977e224896bb
+Subproject commit 5f890fcb6dc07148c22568ad03bf9c079bcad249
--
2.47.3
next prev parent reply other threads:[~2026-08-25 9:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 9:17 [PATCH many 0/8] fix #7530: Implement download bandwidth and restore limits for pbs-restore Christian Ebner
2026-08-25 9:17 ` [PATCH proxmox 1/8] pbs-api-types: expose ClientRateLimitConfig fields as pub Christian Ebner
2026-08-25 9:17 ` [PATCH proxmox-backup-qemu 2/8] restore: fix useless borrow clippy warnings for archive names Christian Ebner
2026-08-25 9:17 ` [PATCH proxmox-backup-qemu 3/8] commands: fix clippy error for reimplementing Result::ok() Christian Ebner
2026-08-25 9:17 ` Christian Ebner [this message]
2026-08-25 9:17 ` [PATCH proxmox-backup-qemu 5/8] restore: implement `bw-limit` parameter imposing download rate limits Christian Ebner
2026-08-25 9:17 ` [PATCH proxmox-backup-qemu 6/8] restore: implement `rate-limit` imposing chunk data stream limits Christian Ebner
2026-08-25 9:17 ` [PATCH pve-qemu 7/8] fix #7530: pbs-restore: expose optional rate limit parameters Christian Ebner
2026-08-25 9:17 ` [PATCH qemu-server 8/8] pbs-restore: set restore bandwidth limit for volumes Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260825091741.162883-5-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.