From dea4b04c1cf77414dea50c54f2f3f89b7ff71388 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 10 Jul 2020 11:44:53 +0200 Subject: [PATCH] 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 --- PVE/QemuServer.pm | 3 +++ 1 file changed, 3 insertions(+) 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, -- 2.39.2