add FileRestore API for PBS

Includes list and restore calls.

Requires VM.Backup and Datastore.Audit permissions, for the accessed
VM/CT and containing datastore respectively.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter
2021-04-22 17:34:54 +02:00
committed by Thomas Lamprecht
parent 6035a5dfb1
commit f1a3ce3b17
3 changed files with 167 additions and 1 deletions

View File

@ -12,6 +12,7 @@ use PVE::RRD;
use PVE::Storage;
use PVE::API2::Storage::Content;
use PVE::API2::Storage::PruneBackups;
use PVE::API2::Storage::FileRestore;
use PVE::RESTHandler;
use PVE::RPCEnvironment;
use PVE::JSONSchema qw(get_standard_option);
@ -32,6 +33,11 @@ __PACKAGE__->register_method ({
path => '{storage}/content',
});
__PACKAGE__->register_method ({
subclass => "PVE::API2::Storage::FileRestore",
path => '{storage}/file-restore',
});
__PACKAGE__->register_method ({
name => 'index',
path => '',