]> git.proxmox.com Git - pve-storage.git/blobdiff - src/PVE/Storage.pm
storage migrate: only output about cleaning-up snapshots if there are any
[pve-storage.git] / src / PVE / Storage.pm
index 1dc79aee9cc1a1690a7f273869bd766b7f8882b1..f19a11506a62096b68b760f1c3945cd289518657 100755 (executable)
@@ -915,8 +915,8 @@ sub storage_migrate {
            if !defined($new_volid) && $target_apiver >= 5;
     };
     my $err = $@;
-    warn "send/receive failed, cleaning up snapshot(s)..\n" if $err;
     if ($opts->{migration_snapshot}) {
+       warn "send/receive failed, cleaning up snapshot(s)..\n" if $err;
        eval { volume_snapshot_delete($cfg, $volid, $opts->{snapshot}, 0) };
        warn "could not remove source snapshot: $@\n" if $@;
     }