mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-02 17:12:42 +00:00
use get_repository from PVE::PBSClient
this fixes the issue that we did not generate the correct repository url for pbs storages that contained an ipv6 address or a port Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
012b520e5b
commit
fbec3f894a
@ -34,6 +34,7 @@ use PVE::GuestHelpers qw(safe_string_ne safe_num_ne safe_boolean_ne);
|
||||
use PVE::INotify;
|
||||
use PVE::JSONSchema qw(get_standard_option parse_property_string);
|
||||
use PVE::ProcFSTools;
|
||||
use PVE::PBSClient;
|
||||
use PVE::RPCEnvironment;
|
||||
use PVE::Storage;
|
||||
use PVE::SysFSTools;
|
||||
@ -6058,13 +6059,10 @@ sub restore_proxmox_backup_archive {
|
||||
my ($storeid, $volname) = PVE::Storage::parse_volume_id($archive);
|
||||
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
|
||||
|
||||
my $server = $scfg->{server};
|
||||
my $datastore = $scfg->{datastore};
|
||||
my $username = $scfg->{username} // 'root@pam';
|
||||
my $fingerprint = $scfg->{fingerprint};
|
||||
my $keyfile = PVE::Storage::PBSPlugin::pbs_encryption_key_file_name($storecfg, $storeid);
|
||||
|
||||
my $repo = "$username\@$server:$datastore";
|
||||
my $repo = PVE::PBSClient::get_repository($scfg);
|
||||
|
||||
# This is only used for `pbs-restore`!
|
||||
my $password = PVE::Storage::PBSPlugin::pbs_get_password($scfg, $storeid);
|
||||
|
@ -14,6 +14,7 @@ use PVE::Cluster qw(cfs_read_file);
|
||||
use PVE::INotify;
|
||||
use PVE::IPCC;
|
||||
use PVE::JSONSchema;
|
||||
use PVE::PBSClient;
|
||||
use PVE::QMPClient;
|
||||
use PVE::Storage::Plugin;
|
||||
use PVE::Storage::PBSPlugin;
|
||||
@ -473,12 +474,8 @@ sub archive_pbs {
|
||||
|
||||
my $starttime = time();
|
||||
|
||||
my $server = $scfg->{server};
|
||||
my $datastore = $scfg->{datastore};
|
||||
my $username = $scfg->{username} // 'root@pam';
|
||||
my $fingerprint = $scfg->{fingerprint};
|
||||
|
||||
my $repo = "$username\@$server:$datastore";
|
||||
my $repo = PVE::PBSClient::get_repository($scfg);
|
||||
my $password = PVE::Storage::PBSPlugin::pbs_get_password($scfg, $opts->{storage});
|
||||
my $keyfile = PVE::Storage::PBSPlugin::pbs_encryption_key_file_name($scfg, $opts->{storage});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user