PowerShell script exchange
Post Reply
zcript3r
Lurker
Posts: 2
Liked: never
Joined: Nov 02, 2017 6:56 pm
Full Name: Robert Wasiniak
Contact:

OFFLINE BACKUPS

Post by zcript3r »

Hello,
I have a requirement to use VEEAM B&R for offline backups. These backups will be getting copied to Exagrids, and will be getting unplugged from the network once the backup copy jobs are complete (until next month). The intent is to ensure we have a copy of our infrastructure in the event malware encrypts our enterprise.

My problem is that with Backup Copy Jobs, I have found them to either be set to Continuous or Disabled. In Continuous mode, it would seem that I have less control over when the backup copy jobs start than if I control is manually with a script.

My intent was to leave all Backup Copy Jobs in the disabled state until the time we want to refresh the offline backup. At that point I can enable the jobs, run the jobs, and then set them back to disabled when the job completes. My issue now is that once the job completes, the script will not successfully disable the job. If it would do that I would be good to go. Am I not thinking about this process correctly? Is there a better built-in way to get what I need accomplished?

Thanks in advance!
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: OFFLINE BACKUPS

Post by foggy »

zcript3r wrote:At that point I can enable the jobs, run the jobs, and then set them back to disabled when the job completes. My issue now is that once the job completes, the script will not successfully disable the job.
Hi Robert, could you please clarify your concern here, why the script wouldn't disable the job correctly?
zcript3r
Lurker
Posts: 2
Liked: never
Joined: Nov 02, 2017 6:56 pm
Full Name: Robert Wasiniak
Contact:

Re: OFFLINE BACKUPS

Post by zcript3r »

The issue I seem to be having is that the script will not move from the running of the job to the disabling of the job. Powershell just hangs for hours until I manually stop the script from running. I can then immediately run another script that will set the backup copy job to disable. Are there other things I need to be doing once the job has finished other than Disable?

I am simply doing the following:

Get-VBRJob -Name "Name of OFFLINE copy" | Enable-VBRJob
Get-VBRJob -Name "Name of OFFLINE copy" | Start-VBRJob
Get-VBRJob -Name "Name of OFFLINE copy" | Disable-VBRJob

If this would work everytime, I can generate a list of VMs and perform these functions on them in whatever order is best. I just can't get the job to go back to disable after running it as above.

Thanks.
veremin
Product Manager
Posts: 20389
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: OFFLINE BACKUPS

Post by veremin »

Have you tried to use Sync-VBRBackupCopyJob cmdlet, instead of Start-VBRJob? Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests