Skip to content

Commit 8997d7d

Browse files
author
Marcin Przepiorowski
committed
fix for snapshot of MS SQL in 5.2
1 parent 44371e3 commit 8997d7d

File tree

3 files changed

+44
-11
lines changed

3 files changed

+44
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.3.4.1
2+
3+
### Changed
4+
5+
* fix for MS SQL snapshot in 5.2
6+
17
## 2.3.4
28

39
### Added

lib/MSSQLVDB_obj.pm

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,44 @@ sub snapshot
248248
}
249249

250250
my %snapshot_type;
251+
252+
if ($self->{_dlpxObject}->getApi() lt "1.9") {
251253

252-
if ($self->getType() eq 'VDB') {
253-
%snapshot_type = (
254-
"type" => "MSSqlSyncParameters"
255-
);
256-
}
257-
else {
258-
%snapshot_type = (
259-
"type" => "MSSqlSyncParameters",
260-
"loadFromBackup" => $frombackup_json
261-
);
254+
if ($self->getType() eq 'VDB') {
255+
%snapshot_type = (
256+
"type" => "MSSqlSyncParameters"
257+
);
258+
}
259+
else {
260+
%snapshot_type = (
261+
"type" => "MSSqlSyncParameters",
262+
"loadFromBackup" => $frombackup_json
263+
);
264+
}
265+
266+
} else {
267+
268+
if ($self->getType() eq 'VDB') {
269+
# it doesn't matter - but it has to be a valid option
270+
# taken from GUI
271+
%snapshot_type = (
272+
"type" => "MSSqlNewCopyOnlyFullBackupSyncParameters",
273+
"compressionEnabled" => JSON::false
274+
);
275+
}
276+
else {
277+
if ( $frombackup eq "yes" ) {
278+
%snapshot_type = (
279+
"type" => "MSSqlExistingMostRecentBackupSyncParameters"
280+
);
281+
} else {
282+
%snapshot_type = (
283+
"type" => "MSSqlNewCopyOnlyFullBackupSyncParameters",
284+
"compressionEnabled" => JSON::false
285+
);
286+
}
287+
}
288+
262289
}
263290
return $self->VDB_obj::snapshot(\%snapshot_type) ;
264291
}

lib/Toolkit_helpers.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use File::Spec;
2929

3030
use lib '../lib';
3131

32-
our $version = '2.3.4';
32+
our $version = '2.3.4.1';
3333

3434
sub logger {
3535
my $debug = shift;

0 commit comments

Comments
 (0)