I now want to run a Surebackup job on Saturday, after the last backup, that checks all the full backups and if successful, runs the robocopy task.
To accomplish this I was hoping to be able to schedule the Surebackup job to run after the last backup job, only on Saturday, but you can only specify after which job to run. That approach wasn't going to work so I wrote a short script that starts the Surebackup job as a post job activity for the last backup only Saturday. Now I only needed to add the Robocopy script to run after the Surebackup Job which I cannot because Surebackup doesn't have a post job activity.
Is it possible to continue running commands in the PS script after executing the Surebackup job?
- Code: Select all
$Job = Get-VBRJob -name "Server-et"
$StartTime = $Job.FindLastSession().CreationTime
If ($Job.GetLastresult() -eq "Warning" -or $Job.GetLastresult() -eq "Success")
$JobSurebackup = Get-VSBJob -name "SureBackup_1"
>>Insert robocopy script here<<
& 'c:\program files\veeam\scripts\sendmailfailed3.ps1'
If not can anyone help me accomplish this? I mean, what's the point in copying the full backups if they don't pass a surebackup task.