Zum Inhalt springen

Veeam move unprotected media to free pool

 

Veeam Backup & Replication verschiebt Bänder, deren Überschreibfrist abgelaufen ist nicht automatisch in den zentralen “FreeMediaPool”, aus dem sich alle Pools bedienen.

 

Das kann dazu führen, dass freie Medien in einem Pool liegen, ein anderer keine freien Medien findet.

Das nachfolgende kurze Script findet alle freien Medien und verschiebt sie in den zentralen FreePool.

cls
#Add Veeam Snap In
Add-PSSnapin -Name VeeamPSSnapIn
#define Media pools to process
$myPoolsToProcess=@("Pool1","GFS1","Pool2")
#get all Veeam Media Pools with names in myPoolsToProcess
$myPools = Get-VBRTapeMediaPool | Where-Object { $_.name -in $myPoolsToProcess }
foreach ($myPool in $myPools)
{
$myMediaToProcess = Get-VBRTapeMedium -MediaPool $myPool.Name | Where-Object { ($_.IsExpired -eq 1 -and $_.IsLocked -eq 0 -and $_.ProtectedBySoftware -eq 0 -and $_.ProtectedByHardware -eq 0)}

foreach ($myMediaToProces in $myMediaToProcess)
{
#move media
Move-VBRTapeMedium -Medium $myMediaToProces -MediaPool "Free" -Confirm:$false
}
}

 

cls
#Add Veeam Snap In
Add-PSSnapin -Name VeeamPSSnapIn
#define Media pools to process
$myPoolsToProcess=@("Pool1","GFS1","Pool2")
#get all Veeam Media Pools with names in myPoolsToProcess
$myPools = Get-VBRTapeMediaPool | Where-Object { $_.name -in $myPoolsToProcess }
foreach ($myPool in $myPools)
    {
        $myMediaToProcess = Get-VBRTapeMedium -MediaPool $myPool.Name | Where-Object { ($_.IsExpired -eq 1 -and  $_.IsLocked -eq 0 -and $_.ProtectedBySoftware -eq 0 -and $_.ProtectedByHardware -eq 0)}

            foreach ($myMediaToProces in $myMediaToProcess)
            {
                #move media
                Move-VBRTapeMedium -Medium $myMediaToProces -MediaPool "Free" -Confirm:$false
            }
    }

Schreibe einen Kommentar