[pbs-devel] [PATCH proxmox-backup v2 1/4] api-types: add an UploadStatistic api type
Dominik Csapak
d.csapak at proxmox.com
Tue Dec 5 11:53:42 CET 2023
We'll want this to expose on the api, but the internal type used in the
backup environment does not use kebab case, so simply add a new type
I opted for a new type instead of modifying the existing one, so that we
keep the casing for the options in the manifest the same.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
pbs-api-types/src/datastore.rs | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index d4ead1d1..52f83f48 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -421,6 +421,22 @@ pub struct SnapshotVerifyState {
pub state: VerifyState,
}
+#[api()]
+#[derive(Copy, Clone, Serialize, Deserialize, PartialEq)]
+#[serde(rename_all = "kebab-case")]
+/// Chunk upload statistics of a snapshot
+pub struct UploadStatistic {
+ /// Amount of chunks uploaded (incl. duplicates)
+ pub count: u64,
+ /// Uncompressed bytes uploaded
+ pub size: u64,
+ /// Compressed bytes uploaded
+ #[serde(alias = "compressed_size")]
+ pub compressed_size: u64,
+ /// Amount of duplicate chunks uploaded
+ pub duplicates: u64,
+}
+
/// A namespace provides a logical separation between backup groups from different domains
/// (cluster, sites, ...) where uniqueness cannot be guaranteed anymore. It allows users to share a
/// datastore (i.e., one deduplication domain (chunk store)) with multiple (trusted) sites and
--
2.30.2
More information about the pbs-devel
mailing list