use anyhow::{Error};
-use chrono::{DateTime, Utc};
-
-use proxmox_backup::api2::types::Userid;
+use proxmox_backup::api2::types::Authid;
use proxmox_backup::client::{HttpClient, HttpClientOptions, BackupReader};
pub struct DummyWriter {
let host = "localhost";
- let username = Userid::root_userid();
+ let auth_id = Authid::root_auth_id();
let options = HttpClientOptions::new()
.interactive(true)
.ticket_cache(true);
- let client = HttpClient::new(host, username, options)?;
+ let client = HttpClient::new(host, 8007, auth_id, options)?;
- let backup_time = "2019-06-28T10:49:48Z".parse::<DateTime<Utc>>()?;
+ let backup_time = proxmox::tools::time::parse_rfc3339("2019-06-28T10:49:48Z")?;
let client = BackupReader::start(client, None, "store2", "host", "elsa", backup_time, true)
.await?;