Hi there,
When I Google around for info on Backup copies and PoSH, I don't get many good results so I thought I would ask this here.
I have a bunch of Backup copy jobs that are configured as secondary targets for VBR jobs. I want to trigger some of them outside of the schedule that has been configured. I have tried using the code below:
Function Run-CopyJob{
PARAM([string]$jobname)
get-vbrjob | ?{$_.name -eq $jobname} | start-vbrjob -runasync
}
Run-CopyJob 'Backup-Copy job1'
'But I get the error:
4/05/2014 6:59:52 AM :: Failed to start job [Backup-Copy job1] Error: Another job process already in progress.
4/05/2014 6:59:57 AM :: Job [Backup-Copy job1] cannot be started. SessionId: [Long GUID], Timeout: [5.0000412 sec]
I tried disabling a job and then running the script, this started the job, but ended saying it was disabled.
Could someone please point me in the right direction to some doco or experience with this?
Thank you.
-
- Enthusiast
- Posts: 71
- Liked: 6 times
- Joined: Apr 07, 2014 10:00 am
- Full Name: Adrian Hinton
- Contact:
-
- VP, Product Management
- Posts: 6009
- Liked: 2843 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Using Powershell to trigger Backup Copy job V7
Backup Copy jobs run on a continuous schedule and can't be started like normal jobs. If you want to force a sync outside of the normal settings like the "Sync Now" function in the GUI you can use the Sync-VBRBackupCopyJob cmdlet like so:
Code: Select all
Sync-VBRBackupCopyJob -Job "<Job_Name>"
-
- Enthusiast
- Posts: 71
- Liked: 6 times
- Joined: Apr 07, 2014 10:00 am
- Full Name: Adrian Hinton
- Contact:
Re: Using Powershell to trigger Backup Copy job V7
Thank you tsightler. I'll give it a crack. I'll also familiarize myself with all the cmdlets!
-
- VP, Product Management
- Posts: 6009
- Liked: 2843 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Using Powershell to trigger Backup Copy job V7
No problem, should work fine. The online HTML documentation is the most current for becoming familiar with the commands but certainly feel free to ask here as well as not everything is always obvious in the guide. Here's the link to the online Powershell guide:
http://helpcenter.veeam.com/backup/70/powershell/
And here's the section for the Sync-VBRBackupCopy cmdlet:
http://helpcenter.veeam.com/backup/70/p ... pyjob.html
http://helpcenter.veeam.com/backup/70/powershell/
And here's the section for the Sync-VBRBackupCopy cmdlet:
http://helpcenter.veeam.com/backup/70/p ... pyjob.html
Who is online
Users browsing this forum: No registered users and 17 guests