I have scripted the creation of my Veeam Agent backups based on protection groups (Clusters) and now also want to add the creation of the Backup Copy job.
This is what I tried:
Add-VBREPBackupCopyJob -Backup $EPbackup -DirectOperation -Name ($Jname + "-copy") -Description $Copydescr -Repository $CopyRepo
But I cannot find my Veeam Agent Backup job using the following:
$EPbackup = Get-VBRBackup -Name $JnameMX (only shows me backups that have already run.)
or
$EPbackup = Get-VBRBackup -Name $JnameMX
-
- Enthusiast
- Posts: 37
- Liked: 3 times
- Joined: Jun 26, 2019 3:28 pm
- Full Name: Filip Smeets
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Add-VBREpBackupCopyJob
Hi Filip,
To retrieve agent backup job and then use it as a source for backup copy try this method instead:
Best regards,
Oleg
To retrieve agent backup job and then use it as a source for backup copy try this method instead:
Code: Select all
$EPBackupJob = Get-VBREPJob -Name 'JobName'
Add-VBREpBackupCopyJob -BackupJob $EPBackupJob -DirectOperation -Name ($Jname + "-copy") -Description $Copydescr -Repository $CopyRepo
Oleg
-
- Product Manager
- Posts: 20411
- Liked: 2300 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Add-VBREpBackupCopyJob
Small clarification - if you want to add backup copy job for backups created by agent management backup policy, you should try Add-VBRComputerBackupCopyJob cmdlet, because the Add-VBREPBackupCopyJob is an old cmdlet that works mostly for standalone agents only. Thanks!
-
- Enthusiast
- Posts: 37
- Liked: 3 times
- Joined: Jun 26, 2019 3:28 pm
- Full Name: Filip Smeets
- Contact:
Re: Add-VBREpBackupCopyJob
Hi Oleg
Get-VBREPJob returns nothing.
Add-VBRComputerBackupCopyJob doesn't work either as it only accepts CBackup[] objects. To get that object, I need to run Get-VBRBackup and that only returns Backup jobs that have already created backups. As my agent backup job, also created with the script, hasn't run yet, this command also returns nothing.
Small remarkt here. We are running version 9.5. No plans yet to migrate to v10.
Get-VBREPJob returns nothing.
Add-VBRComputerBackupCopyJob doesn't work either as it only accepts CBackup[] objects. To get that object, I need to run Get-VBRBackup and that only returns Backup jobs that have already created backups. As my agent backup job, also created with the script, hasn't run yet, this command also returns nothing.
Small remarkt here. We are running version 9.5. No plans yet to migrate to v10.
-
- Product Manager
- Posts: 20411
- Liked: 2300 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Add-VBREpBackupCopyJob
Add-VBRComputerBackupCopyJob accepts both backup and job objects, but the cmdlet was implemented in version 10 - no idea how you were able to access it in 9.5.
Anyway, additional reason to update to the latest product version.
Thanks!
Anyway, additional reason to update to the latest product version.
Thanks!
Who is online
Users browsing this forum: No registered users and 17 guests