I need to check if the last run of a job was a synthetic full backup. With
Code: Select all
$job = Get-VBRJob -Name "MyJob"
$session = $job.FindLastSession()
Thanks.
Code: Select all
$job = Get-VBRJob -Name "MyJob"
$session = $job.FindLastSession()
Code: Select all
Asnp VeeamPSSnapin
$Job = Get-VBRJob -name "Name of your job"
$Session = $Job.GetLastSession()
$Session.IsFullMode
Code: Select all
asnp "VeeamPSSnapin" -ErrorAction SilentlyContinue
$job = Get-VBRJob -Name "Core Servers"
if ($job.GetLastSession().Logger.GetLog().UpdatedRecords.Title | Select-String "Transform") {
write-host "Session Included Synthetic Full"
}
Code: Select all
Asnp VeeamPSSnapin
$job = Get-VBRJob -Name "Core Servers"
if ($job.FindLastSession().Logger.GetLog().UpdatedRecords.Title | Select-String "Synthetic") {write-host "Session Included Synthetic Full”}
Code: Select all
Job finished at 13.04.2013 21:52:57
Primary bottleneck: Source
Load: Source 96% > Proxy 16% > Network 6% > Target 7%
Transformation completed successfully
All VMs have been processed
Processing 'VM1'
Preparing next VM for processing
Processing 'VM2'
.....
Preparing next VM for processing
Changed block tracking is enabled
VM size: 669,0 GB
Building VM list
Job started at 13.04.2013 01:00:12
Code: Select all
Asnp VeeamPSSnapin
$job = Get-VBRJob -Name "Core Servers"
if ($job.FindLastSession().Logger.GetLog().UpdatedRecords.Title | Select-String "Synthetic") {write-host "Session Included Synthetic Full”}
if ($job.FindLastSession().Logger.GetLog().UpdatedRecords.Title | Select-String "Transformation") {write-host "Session Included Synthetic Full. Previous restore points have been successfully transformed into rollbacks.”}
Right I understand that. But what I want to do is query the job options. Is it possible to query the job options to get the days syn fulls are created on? Say for example I have Sunday and Wednesday "checked" for syn fulls in the job options. Can I use powershell to query that job's options to find the days I have it configured to do syn fulls?v.Eremin wrote:You should query backup sessions, and try to find the lines that indicate synthetic full backup creation. Modify the script provided by Tom, so that, not only the last backup session, but all backup sessions get checked. Thanks.
Code: Select all
Get-VBRJob -name "Name of your backup Job" | select name, {$_.options.BackupTargetOptions.TransformToSyntethicDays}
Users browsing this forum: No registered users and 29 guests