Comprehensive data protection for all workloads
Post Reply
NT29
Enthusiast
Posts: 25
Liked: never
Joined: Oct 02, 2011 6:27 pm
Contact:

copy a backup job

Post by NT29 »

hey
i want to use my weekly job to create a monthly job, so i wanted to copy the job and modify the new, but i didn't found an option to do that

nicolas
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: copy a backup job

Post by Vitaliy S. »

Unfortunately, you cannot re-use existing jobs as a template for creating new jobs, you need to configure a new one. Thanks!
NT29
Enthusiast
Posts: 25
Liked: never
Joined: Oct 02, 2011 6:27 pm
Contact:

Re: copy a backup job

Post by NT29 »

thanks for the reply
Gostev
Chief Product Officer
Posts: 31460
Liked: 6648 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: copy a backup job

Post by Gostev »

Note for future readers, v6 will provide the job cloning capability.
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: copy a backup job

Post by ThomasMc »

v5 Sort of does already via the Copy-VBRJob does it not?

Something like this should work

Code: Select all

$job = Get-VBRJob | ?{$_.name -eq "Test Job"}
Copy-VBRJob -job $job
$newjob = Get-VBRJob | ?{$_.name -eq $job.name + " Copy"} 
$vbrserver = Get-VBRServer | Where {$_.Type -eq "VC"}
Add-VBRJobObject -Job $newjob -Server $vbrserver -Object "VMToAdd"
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: copy a backup job

Post by ThomasMc »

I've been having a mess about with the Copy-VBRJob but it only partially works, seems to copy everything apart from the jobobjects after throwing an error about a folder not found

Code: Select all

Get-VBRJob | Where {$_.Name -eq "Test Job"} | Copy-VBRJob
NT29
Enthusiast
Posts: 25
Liked: never
Joined: Oct 02, 2011 6:27 pm
Contact:

Re: copy a backup job

Post by NT29 »

thanks for your answer
i finally create a new
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: copy a backup job

Post by Sethbartlett »

Thomas, you are correct that it copies all the settings but does not copy the objects with it. Some older folder-id information seems to be in the code:)
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
ThomasMc
Veteran
Posts: 293
Liked: 19 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: copy a backup job

Post by ThomasMc »

Thanks Seth, suppose we could do this to copy it properly until its fixed :)

Code: Select all

Add-PsSnapin -Name VeeamPSSnapIn

$uinput = Read-Host "Enter Job Name"

function addjo{
  Param ([string]$vmname)
  $newjob =  Get-VBRJob | ?{$_.name -eq $uinput + " Copy"}
  $vbrserver = Get-VBRServer | Where {$_.Type -eq "VC"}
  Add-VBRJobObject -Job $newjob -Server $vbrserver -Object $vmname
}

Get-VBRJob | Where {$_.Name -eq $uinput} | Copy-VBRJob -erroraction silentlycontinue
Get-VBRJob | Where {$_.Name -eq $uinput} | Get-VBRJobObject | ForEach-Object {addjo $_.name}
Post Reply

Who is online

Users browsing this forum: No registered users and 256 guests