76425d84b3
For now it only supports 'list' and 'extract' commands for 'pxar.didx' files. This should be the foundation for a general file-restore interface that is shared with block-level snapshots. This is packaged as a seperate .deb file, since for block level restore it will need to depend on pve-qemu-kvm, which we want to seperate from proxmox-backup-client. [original code for proxmox-file-restore.rs] Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> [code cleanups/clippy, use helpers::list_dir_content/ArchiveEntry, no /block subdir for .fidx files, seperate binary and package] Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
40 lines
907 B
Rust
40 lines
907 B
Rust
//! The Proxmox Backup Server API
|
|
|
|
pub mod access;
|
|
pub mod admin;
|
|
pub mod backup;
|
|
pub mod config;
|
|
pub mod node;
|
|
pub mod reader;
|
|
pub mod status;
|
|
pub mod types;
|
|
pub mod version;
|
|
pub mod ping;
|
|
pub mod pull;
|
|
pub mod tape;
|
|
pub mod helpers;
|
|
|
|
use proxmox::api::router::SubdirMap;
|
|
use proxmox::api::Router;
|
|
use proxmox::list_subdirs_api_method;
|
|
|
|
const NODES_ROUTER: Router = Router::new().match_all("node", &node::ROUTER);
|
|
|
|
const SUBDIRS: SubdirMap = &[
|
|
("access", &access::ROUTER),
|
|
("admin", &admin::ROUTER),
|
|
("backup", &backup::ROUTER),
|
|
("config", &config::ROUTER),
|
|
("nodes", &NODES_ROUTER),
|
|
("ping", &ping::ROUTER),
|
|
("pull", &pull::ROUTER),
|
|
("reader", &reader::ROUTER),
|
|
("status", &status::ROUTER),
|
|
("tape", &tape::ROUTER),
|
|
("version", &version::ROUTER),
|
|
];
|
|
|
|
pub const ROUTER: Router = Router::new()
|
|
.get(&list_subdirs_api_method!(SUBDIRS))
|
|
.subdirs(SUBDIRS);
|