From: Wolfgang Bumiller Date: Fri, 10 Jul 2020 09:44:53 +0000 (+0200) Subject: Add comment about pbs env vars X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=dea4b04c1cf77414dea50c54f2f3f89b7ff71388 Add comment about pbs env vars pbs-restore might not stay there like that forever and if this code path changes we should remember to also remove the environment variables Signed-off-by: Wolfgang Bumiller --- diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 6872e06..c3b682c 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5937,6 +5937,8 @@ sub restore_proxmox_backup_archive { my $fingerprint = $scfg->{fingerprint}; my $repo = "$username\@$server:$datastore"; + + # This is only used for `pbs-restore`! my $password = PVE::Storage::PBSPlugin::pbs_get_password($scfg, $storeid); local $ENV{PBS_PASSWORD} = $password; local $ENV{PBS_FINGERPRINT} = $fingerprint if defined($fingerprint); @@ -6039,6 +6041,7 @@ sub restore_proxmox_backup_archive { my $path = PVE::Storage::path($storecfg, $volid); + # This is the ONLY user of the PBS_ env vars set on top of this function! my $pbs_restore_cmd = [ '/usr/bin/pbs-restore', '--repository', $repo,