none
Consistency Scheduling RRS feed

  • Question

  • Is there anyway to schedule a consistency check for DPM?

    1) I dont want a Hyper-V server to run a consistency check anytime thru out the day or night - NOT GOOD

    2) I dont want to run a daily consistency check, only Monday thru Friday at a certain time. Or be able to choose a day i dont want it to run.

    Please let me know if this is possible or a future enhancement.

    THANKS


    ANNCEX

    • Moved by BrianEhMVP Wednesday, February 19, 2014 10:12 PM
    Wednesday, February 19, 2014 8:58 PM

All replies

  • Hi,

    Is you only select the 2nd option, the consistency checks will only run against inconsistent data sources starting at the time you selected.  If no data sources are inconsistent, nothing will run - so the impact of running it daily is minimal.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, February 19, 2014 11:11 PM
    Moderator
  • True, but we have huge clusters backing up approx 450vm's over 10 DPM servers, with many Protection Groups.

    We do maintenance on Sat so no backups or consistency checks can run. so for me to make this change on a weekly basis is tedious. I'd say most days my backups run like a charm, but there are days they will fail for vss errors, etc,  so if i cannot control the days the consistency check runs this is problematic.


    ANNCEX

    Wednesday, February 19, 2014 11:25 PM
  • Hi,

    If you don't like either of the options DPM offers, you can manually run this powershell script.  It again will only run CC against inconsistent data sources.

    param ([string] $DPMServerName)
    if(("-?","-help") -contains $args[0])
    {
        Write-Host "Description: This script runs a consistency check on all the actively protected datasources " `
            "which are not in valid state."
        Write-Host "Usage: Validate-InvalidDatasources.ps1 [-DPMServerName] <Name of the DPM server>"
        Write-Host "Example: Validate-InvalidDatasources.ps1 mohitc02"
        exit 0
    }
    if (!$DPMServerName)
    {
        $DPMServerName = (&hostname)
        if (!$DPMServerName)
        {
            Write-Error "Dpm server name not specified."
            exit 1
        }
    }
    if (!(Connect-DPMServer $DPMServerName))
    {
        Write-Error "Failed to connect To DPM server $DPMServerName"
        exit 1
    }
    $jobList = @()
    foreach ($datasource in @(Get-Datasource -DPMServerName $DPMServerName | ? {$_.Protected -and $_.State -eq "Invalid"}))
    {
        $jobList += @{Job = Start-DatasourceConsistencyCheck -Datasource $datasource; Datasource = $($datasource.LogicalPath)}
    }
    $completedJobsCount = 0
    while ($completedJobsCount -ne $jobList.Length)
    {
        $completedJobsCount = 0
        Write-Host ""
        foreach ($jobHT in $jobList)
        {
            if ($jobHT.Job.HasCompleted)
            {
                Write-Host "Consistency check on $($jobHT.Datasource) completed. Status: $(($jobHT.Job).Status)"
                $completedJobsCount += 1
            }
            else
            {
                Write-Host "Runnning consistency check on $($jobHT.Datasource)..."
            }
        }
        sleep 5
    
    }
    


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    • Proposed as answer by EugeneLeitanMVP Thursday, February 20, 2014 6:27 AM
    Wednesday, February 19, 2014 11:34 PM
    Moderator
  • Perfect, I will test it out and let you know how it goes.

    Thanks MIKE :)


    ANNCEX

    Wednesday, February 19, 2014 11:36 PM
  • Script "Validate-InvalidDatasources.ps1" work for me!

    Have a nice day !!!

    Thursday, February 20, 2014 6:27 AM
  • $pg = Get-ProtectionGroup DMPSERVERNAME 
    foreach ($pgi in $pg) { $ds = get-datasource $pgi; foreach ($dsi in $ds) { if ($dsi.State -eq 'Invalid') { Start-DatasourceConsistencyCheck $dsi | out-null; $dsi.ProductionServerName + " :: " + $dsi.DisplayPath } } }
    


    Have a nice day !!!

    Thursday, February 20, 2014 9:05 AM
  • DPM Daily Maintenance Script

    but for DPM 2007


    Have a nice day !!!

    Thursday, February 20, 2014 9:06 AM
  • I'm running DPM 2012 SP1 & DPM 2012 R2 versions only. I'm going to try the Script Mike posted and let you all know the status.

    ANNCEX

    Thursday, February 20, 2014 3:00 PM