We are fetching Virtual machines backup status from Backup server with the below script.
Is there any possibility to fetch agent based backups (ex: Linux & Windows physical servers, RMAN)
Code: Select all
# Fetch each backup job sessions from VBR for the last 24 hours
$vbrsessions = Get-VBRBackupSession | Where-Object {$_.JobType -eq "Backup" -and $_.EndTime -ge (Get-Date).addhours(-24)}
# Fetch each client session details from each backup job
$client = foreach ($session in $vbrsessions) {$session.gettasksessions()| Select Name, Jobname, Status, @{n='StartTime';e={$_.Progress.StartTimeLocal}}, @{n='EndTime';e={$_.Progress.StopTimeLocal}},@{n='TransferedSizeinMB';e={[math]::Round(($_.Progress.TransferedSize/1048576),2)}}}
$setarray = @("Name","JobName", "Status", "StartTime", "EndTime", "TransferedSizeinMB" )
# Export a client summary to csv with coloumns Server, Job, Status, StartTime,EndTime, TransferedSizeinMB
$client | Select-Object -Property $setarray | Export-CSV -Encoding "UTF8" -NoTypeInformation c:\backupstatus.csv
Suryanarayanan