|
84 | 84 | 'presync=s@' =>\(my $presync), |
85 | 85 | 'postsync=s@' =>\(my $postsync), |
86 | 86 | 'hooks=s' => \(my $hooks), |
| 87 | + 'stagingpush' => \(my $stagingpush), |
87 | 88 | 'dever=s' => \(my $dever), |
88 | 89 | 'debug:n' => \(my $debug), |
89 | 90 | 'all' => (\my $all), |
|
140 | 141 | exit (1); |
141 | 142 | } |
142 | 143 |
|
143 | | - if ( ( lc $type ne 'db2' ) && ( ! ( defined($type) && defined($sourcename) && defined($dsourcename) && defined($source_os_user) && defined($group) ) ) ) { |
| 144 | + |
| 145 | + if (defined($stagingpush)) { |
| 146 | + if (! defined($group)) { |
| 147 | + print "For staging push -group is required. \n"; |
| 148 | + pod2usage(-verbose => 1, -input=>\*DATA); |
| 149 | + exit (1); |
| 150 | + } |
| 151 | + } |
| 152 | + elsif ( ( lc $type ne 'db2' ) && ( ! ( defined($type) && defined($sourcename) && defined($dsourcename) && defined($source_os_user) && defined($group) ) ) ) { |
144 | 153 | print "Options -sourcename, -dsourcename, -group, -source_os_user are required. \n"; |
145 | 154 | pod2usage(-verbose => 1, -input=>\*DATA); |
146 | 155 | exit (1); |
|
207 | 216 |
|
208 | 217 | if (((lc $action eq 'attach') || (lc $action eq 'create')) && (( lc $type ne 'db2' ) && ( lc $type ne 'vfiles' ) && (! ( defined($dbuser) && defined($password) ) ) ) ) { |
209 | 218 | # no db user exceptions |
210 | | - if (( lc $type eq 'mssql' ) && ( lc $dbusertype eq 'environment' ) ) { |
211 | | - $dbuser = $source_os_user; |
212 | | - } elsif (lc $type eq 'oracle') { |
213 | | - if ( ! (version->parse($engine_obj->getApi()) >= version->parse(1.11.7) ) ) { |
214 | | - print "Options -dbuser and -password are required for Oracle for version lower than 6.0.7 \n"; |
215 | | - pod2usage(-verbose => 1, -input=>\*DATA); |
216 | | - exit (1) |
217 | | - } |
218 | | - } else { |
219 | | - print "Options -dbuser and -password are required for non vFiles dsources. \n"; |
220 | | - pod2usage(-verbose => 1, -input=>\*DATA); |
221 | | - exit (1); |
| 219 | + if (!defined($stagingpush)) { |
| 220 | + if (( lc $type eq 'mssql' ) && ( lc $dbusertype eq 'environment' ) ) { |
| 221 | + $dbuser = $source_os_user; |
| 222 | + } elsif (lc $type eq 'oracle') { |
| 223 | + if ( ! (version->parse($engine_obj->getApi()) >= version->parse(1.11.7) ) ) { |
| 224 | + print "Options -dbuser and -password are required for Oracle for version lower than 6.0.7 \n"; |
| 225 | + pod2usage(-verbose => 1, -input=>\*DATA); |
| 226 | + exit (1) |
| 227 | + } |
| 228 | + } else { |
| 229 | + print "Options -dbuser and -password are required for non vFiles dsources. \n"; |
| 230 | + pod2usage(-verbose => 1, -input=>\*DATA); |
| 231 | + exit (1); |
| 232 | + } |
222 | 233 | } |
223 | 234 | } |
224 | 235 |
|
|
308 | 319 | my $source = ($databases->getDB($source_ref->[0])); |
309 | 320 |
|
310 | 321 | if ( $type eq 'oracle' ) { |
311 | | - $jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$cdbcont); |
| 322 | + $jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$cdbcont, $stagingpush); |
312 | 323 | } else { |
313 | | - $jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$stageenv,$stageinst,$stage_os_user, $backup_dir, $validatedsync, $delphixmanaged, $compression, $dbusertype); |
| 324 | + $jobno = $source->attach_dsource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$stageenv,$stageinst,$stage_os_user, $backup_dir, $validatedsync, $delphixmanaged, $compression, $dbusertype, $stagingpush); |
314 | 325 | } |
315 | 326 |
|
316 | 327 |
|
|
357 | 368 | $ret = $ret + 1; |
358 | 369 | last; |
359 | 370 | } |
360 | | - $jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync, $cdbcont); |
| 371 | + $jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync, $cdbcont, $stagingpush); |
361 | 372 | } |
362 | 373 | elsif ($type eq 'sybase') { |
363 | 374 | my $db = new SybaseVDB_obj($engine_obj,$debug); |
|
373 | 384 | $ret = $ret + 1; |
374 | 385 | last; |
375 | 386 | } |
376 | | - $jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync,$stageenv,$stageinst,$stage_os_user, $backup_dir, $dumppwd, $validatedsync, $delphixmanaged, $compression, $dbusertype, \%commvault); |
| 387 | + $jobno = $db->addSource($sourcename,$sourceinst,$sourceenv,$source_os_user,$dbuser,$password,$dsourcename,$group,$logsync,$stageenv,$stageinst,$stage_os_user, $backup_dir, $dumppwd, $validatedsync, $delphixmanaged, $compression, $dbusertype, \%commvault, $stagingpush); |
377 | 388 | } |
378 | 389 | elsif ($type eq 'vFiles') { |
379 | 390 | my $db = new AppDataVDB_obj($engine_obj,$debug); |
@@ -487,6 +498,7 @@ =head1 SYNOPSIS |
487 | 498 | [-hooks path_to_hooks] |
488 | 499 | [-presync [hookname,]template|filename[,OS_shell] ] |
489 | 500 | [-postsync [hookname,]template|filename[,OS_shell] ] |
| 501 | + [-stagingpush] |
490 | 502 | [-debug ] |
491 | 503 | [-version ] |
492 | 504 | [-help|? ] |
@@ -615,6 +627,9 @@ =head2 dSource arguments |
615 | 627 | =item B<-commstagingclient Commvault staging name> |
616 | 628 | Commvault staging name |
617 | 629 |
|
| 630 | +=item B<-stagingpush> |
| 631 | +Create dsource using staging push technology ( current support MS SQL ) |
| 632 | +
|
618 | 633 | =item B<-hadr hadrPrimarySVC:XXX,hadrPrimaryHostname:hostname,hadrStandbySVC:YYY> |
619 | 634 | Add DB2 dSource with HADR support |
620 | 635 | Parameter hadrTargetList is optional. |
|
0 commit comments