api: backup create: enforce that namespace exists

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-05 19:26:20 +02:00
parent cabda57f0a
commit d45506d4a4

View File

@ -105,6 +105,10 @@ fn upgrade_to_backup_protocol(
);
}
if !datastore.ns_path(&backup_ns).exists() {
proxmox_router::http_bail!(NOT_FOUND, "namespace not found");
}
let worker_id = format!("{}:{}/{}", store, backup_dir_arg.ty(), backup_dir_arg.id());
let env_type = rpcenv.env_type();