-
- Enthusiast
- Posts: 61
- Liked: 7 times
- Joined: May 05, 2016 6:28 pm
- Full Name: n d
- Contact:
Problems with Add-VBRCopyJob
does this sound familiar? i searched the subject first and found other threads.
i want to iterate all my jobs and create copy-jobs based on them, but run into issue right off the bat. Add-VBRCopyJob has a -Type parameter of which i expect to accept "BackupSync", because that is what Get-VBRJob reported to me on a test-copy-job. However it does not. Additionally, the reference document reports that the "Backup" type is "not supported (legacy mode)". So how can this cmdlet even be used?
Furthermore why do Veaam powershell cmdlets not have the -WhatIf parameter?
This, (Veeam cmdlets), could be a god-send, but each and every time i get into a session i'm presented with more weird issues than i'd expect. I've used Powershell for AD and Powershell for VMware with much less aggravation. just IMHO. thanks for the rant relief.
i want to iterate all my jobs and create copy-jobs based on them, but run into issue right off the bat. Add-VBRCopyJob has a -Type parameter of which i expect to accept "BackupSync", because that is what Get-VBRJob reported to me on a test-copy-job. However it does not. Additionally, the reference document reports that the "Backup" type is "not supported (legacy mode)". So how can this cmdlet even be used?
Furthermore why do Veaam powershell cmdlets not have the -WhatIf parameter?
This, (Veeam cmdlets), could be a god-send, but each and every time i get into a session i'm presented with more weird issues than i'd expect. I've used Powershell for AD and Powershell for VMware with much less aggravation. just IMHO. thanks for the rant relief.
-
- Veeam Vanguard
- Posts: 282
- Liked: 113 times
- Joined: Apr 20, 2017 4:19 pm
- Full Name: Joe Houghes
- Location: Castle Rock, CO
- Contact:
Re: Problems with Add-VBRCopyJob
You should be using either Add-VBRViBackupCopyJob or Add-VBRHvBackupCopyJob, depending on which type of environment you have.
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
-
- Enthusiast
- Posts: 61
- Liked: 7 times
- Joined: May 05, 2016 6:28 pm
- Full Name: n d
- Contact:
Re: Problems with Add-VBRCopyJob
wow, thank you. world of difference! i guess apologies are in order ;P
-
- Veeam Vanguard
- Posts: 282
- Liked: 113 times
- Joined: Apr 20, 2017 4:19 pm
- Full Name: Joe Houghes
- Location: Castle Rock, CO
- Contact:
Re: Problems with Add-VBRCopyJob
No worries, I'll check if we should move it to the obsolete cmdlets within the documentation.
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
-
- Enthusiast
- Posts: 61
- Liked: 7 times
- Joined: May 05, 2016 6:28 pm
- Full Name: n d
- Contact:
Re: Problems with Add-VBRCopyJob
Well i got it good enough for me, but not perfect, i tried getting some advanced schedules working, but gave up.
My simplified script is as follows just to get the jobs running with simplerestorepoints. i can do the rest manually via GUI.
My simplified script is as follows just to get the jobs running with simplerestorepoints. i can do the rest manually via GUI.
Code: Select all
Add-PSSnapin VeeamPSSnapIn
$Testing = $true
Disconnect-VBRServer
Connect-VBRServer -server "veeam-serv" -port 9392
$TargetVeeamRepo = "Library BackupRepo 62TB"
$jobs = ( Get-VBRJob | Where-Object {$_.Name -notlike "*Library*" -and $_.Name -notlike "*Off*Campus*" -and $_.Name -notlike "*Copy*"} | Sort-Object -Property Name)
#$jobs = ( Get-VBRJob | Where-Object {$_.Name -eq "TESTJob"} | Sort-Object -Property Name)
foreach ($job in $jobs) {
$jName = $job.Name
$NewCopyJobName = "Library2 $jName BackupCopy"
Write-Host "Job: $jName --> $NewCopyJobName"
If (!$testing) {
Write-Host "Adding: BackupCopyJob named `"$NewCopyJobName`" to `"$TargetVeeamRepo`"."
Add-VBRViBackupCopyJob -DirectOperation -Name "$NewCopyJobName" -Backup "$jName" -Repository "$TargetVeeamRepo"
$copyJob = Get-VBRJob -Name "$NewCopyJobName"
$Options = $copyJob.GetOptions()
$Options.GenerationPolicy.SimpleRetentionRestorePoints = 61
Set-VBRJobOptions -Job "$NewCopyJobName" -Options $Options
} else {
Write-Host "Testing: Nothing being done for: BackupCopyJob named `"$NewCopyJobName`". Set`$Testing=`$false for action."
}
}
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Problems with Add-VBRCopyJob
Can you tell me what exact settings you're struggling with? Chances are, they can be easily changed (via get/setoptions()) after job creation. Thanks!nd39475 wrote:Well i got it good enough for me, but not perfect, i tried getting some advanced schedules working, but gave up.
-
- Enthusiast
- Posts: 61
- Liked: 7 times
- Joined: May 05, 2016 6:28 pm
- Full Name: n d
- Contact:
Re: Problems with Add-VBRCopyJob
i wanted to set target's periodical fulls as follows:
TY
Code: Select all
[✓] Keep the following restore points as full backups for archival purposes
Weekly backup: [0]
Monthly backup [1]
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Problems with Add-VBRCopyJob
Check the GenerationPolicy set of options of the already created jobs. It should have everything you need (the parameter names are self-explanatory). Thanks!
-
- Enthusiast
- Posts: 61
- Liked: 7 times
- Joined: May 05, 2016 6:28 pm
- Full Name: n d
- Contact:
Re: Problems with Add-VBRCopyJob
Thank you so much!
Who is online
Users browsing this forum: No registered users and 6 guests