]> git.proxmox.com Git - qemu-server.git/commitdiff
Add comment about pbs env vars
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 10 Jul 2020 09:44:53 +0000 (11:44 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 10 Jul 2020 09:44:54 +0000 (11:44 +0200)
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 <w.bumiller@proxmox.com>
PVE/QemuServer.pm

index 6872e061ab1cc90a65328412905d99e0d2415454..c3b682cdd99c8199b16771dc32115dabb9627850 100644 (file)
@@ -5937,6 +5937,8 @@ sub restore_proxmox_backup_archive {
     my $fingerprint = $scfg->{fingerprint};
 
     my $repo = "$username\@$server:$datastore";
     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);
     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);
 
 
            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,
            my $pbs_restore_cmd = [
                '/usr/bin/pbs-restore',
                '--repository', $repo,