]> git.proxmox.com Git - pve-container.git/commitdiff
fix #3275: remove old FW config when restoring
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 28 Jan 2021 08:25:59 +0000 (09:25 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 28 Jan 2021 09:28:58 +0000 (10:28 +0100)
otherwise proxmox-backup-client will error and the whole restore will
fail.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/LXC/Create.pm

index 0b38d7de6c16e91e47088b610d702e10220224b9..82d7ad9028e3eff2fefd152c4eb928db0fb62a38 100644 (file)
@@ -294,6 +294,7 @@ sub restore_configuration_from_proxmox_backup {
                if -e $pct_fwcfg_target;
        } else {
            mkdir $pve_firewall_dir; # make sure the directory exists
+           unlink $pct_fwcfg_target;
 
            my $cmd = "restore";
            my $param = [$name, "fw.conf", $pct_fwcfg_target];