Got the assistance I needed with support, posting in case future searches bring up this issue for other users.
Here's a back and forth I had with a configuration support tech:
Support:
After reading through the case this is the conclusion that I have came to:
Your Backup Copy Job should be disabled. After your full backup runs you should have a post job script that enables it. Then have a post job script on the Backup Copy Job that disables it.
This should get the BCJ to only run once and not twice. As of now, with what I have read, it is working as intended, the way that you have it set.
Me:
Can you elaborate a little on how this is working as intended? It sounds like Tuesday is the day I had initially created and enabled the backup copy jobs, so this is when the synchronization interval was set to? The script calling a Sync-VBRBackupCopyJob doesn't reset this interval then?
In any case, if your recommendation is to enable and disable the backup copy job through post job scripts, I'm more than happy to implement that solution. I appreciate your feedback, and feel comfortable closing this case.
Support:
No problem, it is causing a "forced sync" which doesn't reset the interval, it simply tells it to do another sync within that interval. So even though it is syncing on the fulls, it is still on the Tuesday interval.
And here are scripts I'm using to enable my backup copy jobs after the last backup occurs and disable my backup copy jobs after the backup copy job has run:
Enable (had to account for backup jobs running past midnight; also, probably not the most efficient way, but works well):
Code: Select all
Add-PSSnapin VeeamPSSnapin
$Day = (get-date).DayOfWeek.ToString().ToLower()
$AMPM = (get-date).DateTime.ToString().ToLower()
If ($AMPM.Contains("pm"))
{
Switch ($Day)
{
"tuesday" { Enable-VBRJob -Job (Get-VBRJob -Name "VMs_2_Month_Retention_job1_Vault1") }
"wednesday" { Enable-VBRJob -Job (Get-VBRJob -Name "VMs_2_Month_Retention_job2_Vault1") }
"thursday" { Enable-VBRJob -Job (Get-VBRJob -Name "VMs_1_Year_Retention_Vault1") }
"friday" { Enable-VBRJob -Job (Get-VBRJob -Name "TFS_1_Year_Retention_Vault1") }
"saturday" { Enable-VBRJob -Job (Get-VBRJob -Name "TFS_2_Month_Retention_job1_Vault1") }
"sunday" { Enable-VBRJob -Job (Get-VBRJob -Name "TFS_2_Month_Retention_job2_Vault1") }
}
}
ElseIf ($AMPM.Contains("am"))
{
Switch ($Day)
{
"wednesday" { Enable-VBRJob -Job (Get-VBRJob -Name "VMs_2_Month_Retention_job1_Vault1") }
"thursday" { Enable-VBRJob -Job (Get-VBRJob -Name "VMs_2_Month_Retention_job2_Vault1") }
"friday" { Enable-VBRJob -Job (Get-VBRJob -Name "VMs_1_Year_Retention_Vault1") }
"saturday" { Enable-VBRJob -Job (Get-VBRJob -Name "TFS_1_Year_Retention_Vault1") }
"sunday" { Enable-VBRJob -Job (Get-VBRJob -Name "TFS_2_Month_Retention_job1_Vault1") }
"monday" { Enable-VBRJob -Job (Get-VBRJob -Name "TFS_2_Month_Retention_job2_Vault1") }
}
}
Disable (since none of my jobs should be enabled after any particular run, I check to disable all of them):
Code: Select all
Add-PSSnapin VeeamPSSnapin
$BackupCopyJobs = @("VMs_2_Month_Retention_job1_Vault1","VMs_2_Month_Retention_job2_Vault1","VMs_1_Year_Retention_Vault1","TFS_1_Year_Retention_Vault1","TFS_2_Month_Retention_job1_Vault1","TFS_2_Month_Retention_job2_Vault1")
ForEach ($BackupCopyJob in $BackupCopyJobs)
{
If ((Get-VBRJob -Name $BackupCopyJob).IsScheduleEnabled)
{
Disable-VBRJob -Job (Get-VBRJob -Name $BackupCopyJob)
}
}
Also, I didn't find any recommendations for running PowerShell scripts post job run since it's not officially supported. Below is the string I've used to call my script using PowerShell and force it to run as administrator:
Code: Select all
Powershell.exe -Command "Start-Process -FilePath powershell.exe -Argument C:\cmd\Veeam_GFS_Vault1_Disable.ps1 -Verb RunAs"