|
81 | 81 | 'backup=s' => \(my $backup), |
82 | 82 | 'olderthan=s' => \(my $creationtime), |
83 | 83 | 'save=s' => \(my $save), |
| 84 | + 'timeflowparent' => \(my $timeflowparent), |
84 | 85 | 'dever=s' => \(my $dever), |
85 | 86 | 'all' => (\my $all), |
86 | 87 | 'version' => \(my $print_version), |
|
236 | 237 | {'Enabled' ,10}, |
237 | 238 | {'Unique Name' ,30}, |
238 | 239 | {'Parent time' ,35}, |
239 | | - {'VDB creation time' ,35} |
| 240 | + {'VDB creation time',35}, |
| 241 | + {'VDB refresh time' ,35} |
240 | 242 | ); |
241 | 243 | } |
242 | 244 | } |
|
326 | 328 |
|
327 | 329 | my $snaploaded = 0; |
328 | 330 |
|
| 331 | + my $refreshdate; |
| 332 | + |
329 | 333 | # for filtered databases on current engine - display status |
330 | 334 | for my $dbitem ( @db_display_list ) { |
331 | 335 | my $dbobj = $databases->getDB($dbitem); |
|
406 | 410 |
|
407 | 411 | } else { |
408 | 412 |
|
409 | | - $parentsnap = $timeflows->getParentSnapshot($dbobj->getCurrentTimeflow()); |
| 413 | + my $timeflow_for_parent; |
| 414 | + |
| 415 | + if ($dbobj->getType() eq 'VDB') { |
| 416 | + my $hier = $timeflows->generateHierarchy(undef, undef, $databases); |
| 417 | + |
| 418 | + $refreshdate = $timeflows->findrefreshtime($dbobj->getCurrentTimeflow(), $hier, $dbobj->getReference()); |
| 419 | + |
410 | 420 |
|
| 421 | + |
| 422 | + |
| 423 | + if (defined($timeflowparent)) { |
| 424 | + # old behaviour - it will show a rollback as a parent |
| 425 | + # add flag -timeflowparent to activate |
| 426 | + $timeflow_for_parent = $dbobj->getCurrentTimeflow(); |
| 427 | + } else { |
| 428 | + # fixed behaviour - it will always display a snapshot of parent used for refresh |
| 429 | + $timeflow_for_parent = $timeflows->findrefresh($dbobj->getCurrentTimeflow(), $hier, $dbobj->getReference()); |
| 430 | + } |
| 431 | + } else { |
| 432 | + $refreshdate = 'N/A'; |
| 433 | + } |
| 434 | + |
| 435 | + |
| 436 | + $parentsnap = $timeflows->getParentSnapshot($timeflow_for_parent); |
411 | 437 | if (lc $parentlast eq 'p') { |
412 | 438 | if (($parentsnap ne '') && ($dbobj->getType() eq 'VDB')) { |
413 | 439 | if (defined($snapshots)) { |
|
430 | 456 | $ret = $ret + 1; |
431 | 457 | } |
432 | 458 | ($snaptime,$timezone) = $snapshots->getSnapshotTimewithzone($parentsnap); |
433 | | - $parenttime = $timeflows->getParentPointTimestampWithTimezone($dbobj->getCurrentTimeflow(), $timezone); |
| 459 | + $parenttime = $timeflows->getParentPointTimestampWithTimezone($timeflow_for_parent, $timezone); |
434 | 460 | if (defined($parenttime) && ($parenttime eq 'N/A')) { |
435 | | - my $loc = $timeflows->getParentPointLocation($dbobj->getCurrentTimeflow()); |
| 461 | + my $loc = $timeflows->getParentPointLocation($timeflow_for_parent); |
436 | 462 | my $lastsnaploc = $snapshots->getlatestChangePoint($parentsnap); |
437 | 463 | if ( $loc != $lastsnaploc) { |
438 | 464 | $parenttime = $loc; |
|
507 | 533 | $dbobj->getEnabled(), |
508 | 534 | $uniquename, |
509 | 535 | $parenttime, |
510 | | - $crtime |
| 536 | + $crtime, |
| 537 | + $refreshdate |
511 | 538 | ); |
512 | 539 | } |
513 | 540 |
|
@@ -682,6 +709,12 @@ =head1 OPTIONS |
682 | 709 | with many (1000's) snapshots |
683 | 710 |
|
684 | 711 |
|
| 712 | +=item B<-timeflowparent> |
| 713 | +By default Parent Snapshot / Parent time will display a parent object snapshot used for provisioning |
| 714 | +or last refresh operation. With this flag set, dxtoolkit will use an old behaviour and |
| 715 | +display a timeflow parent snapshot which may be a parent database snapshot for provisioning / refresh |
| 716 | +or a current VDB snapshot if rollback operation was done. |
| 717 | +
|
685 | 718 | =item B<-format> |
686 | 719 | Display output in csv or json format |
687 | 720 | If not specified pretty formatting is used. |
@@ -734,6 +767,10 @@ =head1 COLUMNS |
734 | 767 |
|
735 | 768 | =item B<Parent time> - Parent time used for VDB provision (it can be snapshot time or exact time selected ) |
736 | 769 |
|
| 770 | +=item B<VDB creation time> - VDB creation time |
| 771 | +
|
| 772 | +=item B<VDB refresh time> - Last refresh time for VDB |
| 773 | +
|
737 | 774 | =back |
738 | 775 |
|
739 | 776 | =head1 EXAMPLES |
|
0 commit comments