[pbs-devel] [PATCH proxmox-backup v2 2/4] pbs-api-types: add FileRestoreFormat type

Dominik Csapak d.csapak at proxmox.com
Wed Jul 13 11:43:12 CEST 2022


intended for passing the format to the file-restore client/daemon

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 pbs-api-types/src/file_restore.rs | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/pbs-api-types/src/file_restore.rs b/pbs-api-types/src/file_restore.rs
index 5748f3a7..90657d65 100644
--- a/pbs-api-types/src/file_restore.rs
+++ b/pbs-api-types/src/file_restore.rs
@@ -13,3 +13,18 @@ pub struct RestoreDaemonStatus {
     /// not set, as then the status call will have reset the timer before returning the value
     pub timeout: i64,
 }
+
+#[api]
+#[derive(Serialize, Deserialize, PartialEq, Eq)]
+#[serde(rename_all = "kebab-case")]
+/// The desired format of the result.
+pub enum FileRestoreFormat {
+    /// Plain file (only works for single files)
+    Plain,
+    /// PXAR archive
+    Pxar,
+    /// ZIP archive
+    Zip,
+    /// TAR archive
+    Tar,
+}
-- 
2.30.2






More information about the pbs-devel mailing list