]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump : skip special:cloudinit section
authorAlexandre Derumier <aderumier@odiso.com>
Wed, 22 Jun 2022 11:51:58 +0000 (13:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 8 Nov 2022 16:23:30 +0000 (17:23 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/VZDump/QemuServer.pm

index 7fb51c7d6cec290377332fd0ec0c3f7fecbfd138..0eb5ec62a665ece8aeeda6acc7b34f0f4d9bcdb7 100644 (file)
@@ -215,17 +215,20 @@ sub assemble {
 
     my $found_snapshot;
     my $found_pending;
+    my $found_cloudinit;
     while (defined (my $line = <$conffd>)) {
        next if $line =~ m/^\#vzdump\#/; # just to be sure
        next if $line =~ m/^\#qmdump\#/; # just to be sure
        if ($line =~ m/^\[(.*)\]\s*$/) {
            if ($1 =~ m/PENDING/i) {
                $found_pending = 1;
+           } elsif ($1 =~ m/special:cloudinit/) {
+               $found_cloudinit = 1;
            } else {
                $found_snapshot = 1;
            }
        }
-       next if $found_snapshot || $found_pending; # skip all snapshots and pending changes config data
+       next if $found_snapshot || $found_pending || $found_cloudinit; # skip all snapshots,pending changes and cloudinit config data
 
        if ($line =~ m/^unused\d+:\s*(\S+)\s*/) {
            $self->loginfo("skip unused drive '$1' (not included into backup)");