mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 08:17:15 +00:00
pbs: restore pxar: add required parameters explicitly in method signature
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ad6b323758
commit
8b88b2f6e5
@ -234,13 +234,10 @@ sub backup_tree {
|
||||
};
|
||||
|
||||
sub restore_pxar {
|
||||
my ($self, $opts) = @_;
|
||||
my ($self, $snapshot, $pxarname, $target, $cmd_opts) = @_;
|
||||
|
||||
my $snapshot = delete $opts->{snapshot};
|
||||
die "snapshot not provided\n" if !defined($snapshot);
|
||||
my $pxarname = delete $opts->{pxarname};
|
||||
die "archive name not provided\n" if !defined($pxarname);
|
||||
my $target = delete $opts->{target};
|
||||
die "restore-target not provided\n" if !defined($target);
|
||||
|
||||
my $param = [
|
||||
@ -249,8 +246,9 @@ sub restore_pxar {
|
||||
"$target",
|
||||
"--allow-existing-dirs", 0,
|
||||
];
|
||||
$cmd_opts //= {};
|
||||
|
||||
return $self->run_raw_client_cmd('restore', $param, %$opts);
|
||||
return $self->run_raw_client_cmd('restore', $param, %$cmd_opts);
|
||||
};
|
||||
|
||||
sub forget_snapshot {
|
||||
|
Loading…
Reference in New Issue
Block a user