none
How do you script "Run backup to tape job again" for an active alert? RRS feed

  • Question

  • Hi,

    I'm developing this script to handle DPM alerts. Currently when the recommended alert action is ‘ReRun’ the job is resubmitted. http://gallery.technet.microsoft.com/scriptcenter/en-us/4b0b785b-434c-4f3a-98bf-98202e5e4645

    I'm trying to expand the script to handle CC,SCGrow,ReplicaGrow and BackupToTapeFailedAlert failures.

    I think BackupToTapeFailedAlert should be relatively easy to resubmit but I can’t find the object in the active alert to do that.

    In the GUI there is an option “Run backup to tape job again” – does anyone know the powerscript to do this. I'm guessing it must be possible against the active alert. I can get the DatasourceID so I could try and submit a tape job against that.

    Any help is much appreciated.

    John

    Thursday, December 23, 2010 10:49 AM

Answers

  • I've updated the code and it now resubmits the tape job after doing a resync (the common fault for my backup to tape)
    • Marked as answer by John Grenfell Wednesday, January 5, 2011 9:06 AM
    Wednesday, January 5, 2011 9:06 AM

All replies

  • Hi,

    I've added an extra function which lets me create a New RecoveryPoint to disk ... so I'm guessing that I can just change the -Disk param to Tape ... but it would still be good to know if it's possible to do that agains the alter object.

    J

    Function Run-RecoveryPoint(){
    Param($ProtectionGroupToIndex = "x",$ProtectionServername = "x",$DataSourceType)
    
    	$ProductionServerArray = Get-ProductionServer $DPMServer | Sort-Object Name
    
      $ProtectionGroupArray = Get-ProtectionGroup -DPMServer $DPMServer | sort FriendlyName
      $ProtectionGroupArray | FL *
      ForEach ($ProtectionGroup in $ProtectionGroupArray){
        If ($ProtectionGroup.FriendlyName -eq $ProtectionGroupToIndex){
          $DataSource = Get-Datasource $ProtectionGroup | Where-Object {$_.ProductionServerName -eq $ProtectionServername -and $_.Name -eq $DataSourceType}
          $DataSource | FL
          $DPMJob = New-RecoveryPoint -datasource $DataSource -Disk -BackupType expressfull
          $DPMJob | FL
        }
      }
      
    } 
    
    Thursday, December 23, 2010 12:14 PM
  • I've updated the code and it now resubmits the tape job after doing a resync (the common fault for my backup to tape)
    • Marked as answer by John Grenfell Wednesday, January 5, 2011 9:06 AM
    Wednesday, January 5, 2011 9:06 AM