diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 185e44d3..c6a2d03e 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -260,11 +260,9 @@ fn task_mgmt_cli() -> CommandLineInterface { "remote-store": { schema: DATASTORE_SCHEMA, }, - delete: { - description: "Delete vanished backups. This remove the local copy if the remote backup was deleted.", - type: Boolean, + "remove-vanished": { + schema: REMOVE_VANISHED_BACKUPS_SCHEMA, optional: true, - default: true, }, "output-format": { schema: OUTPUT_FORMAT, @@ -278,7 +276,7 @@ async fn pull_datastore( remote: String, remote_store: String, local_store: String, - delete: Option, + remove_vanished: Option, param: Value, ) -> Result { @@ -286,16 +284,13 @@ async fn pull_datastore( let mut client = connect()?; - let mut args = json!({ + let args = json!({ "store": local_store, "remote": remote, "remote-store": remote_store, + "remove-vanished": remove_vanished, }); - if let Some(delete) = delete { - args["delete"] = delete.into(); - } - let result = client.post("api2/json/pull", Some(args)).await?; view_task_result(client, result, &output_format).await?;