Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
arun.kr
Service Provider
Posts: 25 Liked: never
Joined: Aug 16, 2014 1:13 am
Full Name: Arun Kumar
Contact:
Post
by arun.kr » Nov 12, 2017 9:30 am
this post
Hello Everyone,
we have multiple VAW jobs configured and pointing to VBR server. as per the requirement, we have to take offsite backup of those agents. So i need to create backup copy jobs for each endpoint job.
I can create copy jobs From powershell command but to create multiple jobs every time i will have to execute the same.
Code: Select all
$Job = Get-VBRJob -Name 'Template Backup Copy Jobs'
$repo = Get-VBRBackupRepository -name "name of repo"
Add-VBREpBackupCopyJob -Name ELV_SW_OFFSITE -Backup $job -Repository $repo -DirectOperation
# then I am running commands to set various job options.
$Options = $Job.GetOptions()
options.....
$Job.SetOptions($Options)
So i am looking for a script to create multiple backup copy job for VAW jobs.
Thanks in advance
Arun
nielsengelen
Product Manager
Posts: 5619 Liked: 1177 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:
Post
by nielsengelen » Nov 12, 2017 10:16 am
1 person likes this post
Try the following:
Code: Select all
$AgentJobs = Get-VBREPJob
foreach ($AgentJob in $AgentJobs.Name) {
$repo = Get-VBRBackupRepository -Name "AGENTS"
Add-VBREpBackupCopyJob -Name "ELV_SW_OFFSITE_$AgentJob" -Description "Backup job for $AgentJob" -Backup $AgentJob -Repository $Repo -DirectOperation
}
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
arun.kr
Service Provider
Posts: 25 Liked: never
Joined: Aug 16, 2014 1:13 am
Full Name: Arun Kumar
Contact:
Post
by arun.kr » Nov 17, 2017 7:06 pm
this post
Hello Niels,
Thanks for your help.
Add-VBREpBackupCopyJob -Name "ELV_SW_OFFSITE_$AgentJob"
is there any way I can use "computer name_offsite". this is the std, we are following for all jobs. in above example "ELV_WS" is computer name and offsite is suffix for secondary backup job.
Thanks
Arun
Users browsing this forum: No registered users and 21 guests