Hello,
How to get the retention for deleted item with backup copy job with Get-VBRBackupCopyJob ?
-
- Veeam Legend
- Posts: 824
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
-
- Veeam Software
- Posts: 2015
- Liked: 671 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Get-VBRBackupCopyJob deleted items
Currently there is no way to do it. We have a requirement to add it in one of the next product versions. As a workaround, you can use Get-VBRJob cmdlet:
Best regards,
Oleg
Code: Select all
$job = Get-VBRJob -Name "Backup Copy Job 1"
$job.GenerationPolicy.EnableDeletedVmDataRetention
$job.GenerationPolicy.DeletedVmsDataRetentionPeriodDays
Oleg
-
- Veeam Legend
- Posts: 824
- Liked: 128 times
- Joined: May 11, 2018 8:42 am
- Contact:
Re: Get-VBRBackupCopyJob deleted items
Thanks for your answer.
I'm sorry but I don't have Generationpolicy property on $job
Are you sure the cmdlet is the correct one ?
I did it this way with the older cmdlet :
$element = Get-VBRJob -name "xxxx"
I'm not sure it worked but I'm sure on V12, values are not updated because I check it with GUI and set it on 30 days and with get-vbrjob I don't see it's enabled and I don't seen 30 days
PS : Ok I find what you mentioned here :
$job = Get-VBRJob -Name "Backup Copy Job 1"
$job.Options.GenerationPolicy.EnableDeletedVmDataRetention
$job.Options.GenerationPolicy.DeletedVmsDataRetentionPeriodDays
I'm sorry but I don't have Generationpolicy property on $job
Are you sure the cmdlet is the correct one ?
I did it this way with the older cmdlet :
$element = Get-VBRJob -name "xxxx"
Code: Select all
if($element.BackupStorageOptions.EnableDeletedVmDataRetention -eq $true) {$element.BackupStorageOptions.RetainDays} else {"<N/A>"}
PS : Ok I find what you mentioned here :
$job = Get-VBRJob -Name "Backup Copy Job 1"
$job.Options.GenerationPolicy.EnableDeletedVmDataRetention
$job.Options.GenerationPolicy.DeletedVmsDataRetentionPeriodDays
Who is online
Users browsing this forum: No registered users and 25 guests