[pve-devel] [PATCH guest-common 4/6] Get snapshots when no state is available.

Wolfgang Link w.link at proxmox.com
Wed Dec 13 15:46:26 CET 2017


---
 PVE/Replication.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/Replication.pm b/PVE/Replication.pm
index dac0994..e69b0c2 100644
--- a/PVE/Replication.pm
+++ b/PVE/Replication.pm
@@ -54,6 +54,13 @@ sub find_common_replication_snapshot {
 		     ($last_snapshots->{$volid}->{$parent_snapname} &&
 		      $remote_snapshots->{$volid}->{$parent_snapname})) {
 		$base_snapshots->{$volid} = $parent_snapname;
+	    } elsif ($last_sync == 0) {
+		foreach my $remote_snap (keys %{$remote_snapshots->{$volid}}) {
+		    # There should only be one snapshot which is equals;
+		    if (defined($last_snapshots->{$volid}->{$remote_snap})) {
+			$base_snapshots->{$volid} = $remote_snap;
+		    }
+		}
 	    }
 	}
     }
-- 
2.11.0





More information about the pve-devel mailing list