File tree Expand file tree Collapse file tree
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,12 @@ public SnapshotResult takeSnapshot(SnapshotInfo snap) {
219219 // the same store as its parent since
220220 // we are taking delta snapshot
221221 private DataStore findSnapshotImageStore (SnapshotInfo snapshot ) {
222- if (snapshot .getParent () == null ) {
222+ Boolean fullSnapshot = true ;
223+ Object payload = snapshot .getPayload ();
224+ if (payload != null ) {
225+ fullSnapshot = (Boolean )payload ;
226+ }
227+ if (fullSnapshot ) {
223228 return dataStoreMgr .getImageStore (snapshot .getDataCenterId ());
224229 } else {
225230 SnapshotInfo parentSnapshot = snapshot .getParent ();
Original file line number Diff line number Diff line change 4040import org .springframework .stereotype .Component ;
4141
4242import com .cloud .exception .InvalidParameterValueException ;
43+ import com .cloud .hypervisor .Hypervisor ;
44+ import com .cloud .hypervisor .Hypervisor .HypervisorType ;
4345import com .cloud .storage .CreateSnapshotPayload ;
4446import com .cloud .storage .DataStoreRole ;
4547import com .cloud .storage .Snapshot ;
@@ -108,7 +110,8 @@ public SnapshotInfo backupSnapshot(SnapshotInfo snapshot) {
108110
109111 boolean fullBackup = true ;
110112 SnapshotDataStoreVO parentSnapshotOnBackupStore = snapshotStoreDao .findLatestSnapshotForVolume (snapshot .getVolumeId (), DataStoreRole .Image );
111- if (parentSnapshotOnBackupStore != null ) {
113+ HypervisorType hypervisorType = snapshot .getBaseVolume ().getHypervisorType ();
114+ if (parentSnapshotOnBackupStore != null && hypervisorType == Hypervisor .HypervisorType .XenServer ) { // CS does incremental backup only for XenServer
112115 int _deltaSnapshotMax = NumbersUtil .parseInt (configDao .getValue ("snapshot.delta.max" ),
113116 SnapshotManager .DELTAMAX );
114117 int deltaSnap = _deltaSnapshotMax ;
You can’t perform that action at this time.
0 commit comments