GetRecoveryResult

Retrieves recovery results for a given run of this recovery plan. Use this method to get the key so subsequent methods can get recovery results history.

Synopsis

RecoveryResult[] getRecoveryResult(int length)
length
is the maximum number of results to retrieve.
RecoveryResult[]
is an array of recovery results for this recovery plan or its peer plan, including:
  • description
    – summary of the plan at the time of this run
  • errorCount
    – count of error‐level faults that were generated by the operation
  • executionTimeInSeconds
    – total execution time in seconds
  • key
    – unique key for this recovery result, useful for subsequent methods
    Staring with
    Site Recovery Manager
    8.8,
    key
    is deprecated and is replaced by
    runKey
    .
  • runKey
    – unique key for this recovery result, useful for subsequent methods
  • name
    – the recovery plan’s name at the time of this run
  • plan
    – recovery plan that this result covers
  • resultState
    – the result state, which is only the final state indicating completion or failure. This enumerates the following values:
    • success
      - The operation completed with no warnings.
    • warnings
      - The operation completed with one or more warnings.
    • errors
      - The operation failed to complete due to one or more errors.
    • cancelled
      - The operation was cancelled.
  • runMode
    – mode of recovery when plan was initiated. This enumerates the following:
    • failover
      - Failover the recovery plan to the peer site. You can failover multiple times in case problems occured on previous runs. Once completed successfully, the plan should be deleted or reprotected. For a plan to be successfully failed over, all of the groups in the plan must be in the shadowing, recovered, or partiallyRecovered states.
    • test
      - Run a test-failover at this site, leaving the primary state unaffected. For a plan to be successfully tested, all of the protection groups must be in the shadowing state.
    • cleanupTest
      - Cleanup after a test run.
    • reprotect
      - Complete an already finished recovery, and start protecting the groups so they may be recovered on the peer site. This will unregister the VMs on the peer site, configuring the storage, and the shadow VMs. This operation may only be performed when the sites are connected, and at least one protection group is in the recovered or partially Recovered state.
    • revert
      - Revert a recovery, abandoning all the VMs on the peer site and powering on the original VMs on the local site. This operation is not allowed unless all the replication groups are in the shadowing, recovered, or partially recovered state. If the sites are not connected, the peer VMs may be left running. In order to correct this situation, re-run
      revert
      after the sites are connected.
      revert
      is not supported currently.
    • migrate
      - Migrate the recovery plan to the peer site. Once completed successfully, the plan should be deleted or reprotected. For a successful migration to occur all of the groups in the plan must be in the shadowing or recovered states.
  • startTime
    ,
    stopTime
    – time when the recovery was started and when it completed or stopped
  • totalPausedTimeInSeconds
    – total time the recovery plan was paused
  • warningCount
    – count of warning‐level faults that were generated by the operation
  • poweredOnVms
    - The count of the VM's that are powered on
  • errorStateVms
    - The count of the VM's that are in Error state
  • successfullyRecoveredVms
    - The count of the VM's that are successfully recovered
  • ipCustomizedVms
    - The count of the VM's that are successfully ip customized
  • errorCustomizedVms
    - The count of the VM's that encountered an error during IP customization.
  • poweredOffVms
    - The count of the VM's that are powered off
  • warnings
    - The warnings encountered for this Recovery Plan
  • errors
    - The errors encountered for this Recovery Plan

Faults

  • InvalidArgument
  • RuntimeFault
Example for GetRecoveryResult
List < SrmRecoveryResult > recoveryResult = srmPortType.getRecoveryResult( ManagedObjectReference _this, int length); Where ManagedObjectReference _this = _historyRef; where _historyRef can be taken from: SrmServiceInstanceContent content = _srmPortType.retrieveContent(_svcRef); ManagedObjectReference _recoveryRef = content.getRecovery(); List < ManagedObjectReference > plans = srmPortType.listPlans( _recoveryRef); ManagedObjectReference _historyRef = srmPortType.getHistory( _recoveryRef, plans.get(0));