PowerShell script exchange
Post Reply
matteu
Veeam Legend
Posts: 912
Liked: 144 times
Joined: May 11, 2018 8:42 am
Contact:

Remove deleted item data after xx days

Post by matteu »

Hello,

How is it possible to configure this option on a backup copy job ?
I don't find the option on the Add/ Set-VBRBackupCopyJob cmdlet

Thanks
oleg.feoktistov
Veeam Software
Posts: 2041
Liked: 687 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Remove deleted item data after xx days

Post by oleg.feoktistov »

matteu,

Looks like we missed it for Add/Set-VBRBackupCopyjob cmdlets. Adding a requirement for vNext.
Thanks for noticing it.

Best regards,
Oleg
matteu
Veeam Legend
Posts: 912
Liked: 144 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Remove deleted item data after xx days

Post by matteu »

Thanks for your answer.
Could you maybe provide an "unsupported" way to do it waiting vNext ?
oleg.feoktistov
Veeam Software
Posts: 2041
Liked: 687 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Remove deleted item data after xx days

Post by oleg.feoktistov »

Unsupported workarounds wouldn't work here either as most of the methods for backup copy jobs are private.
matteu
Veeam Legend
Posts: 912
Liked: 144 times
Joined: May 11, 2018 8:42 am
Contact:

Re: Remove deleted item data after xx days

Post by matteu »

OK.
Thanks for your answer
masonit
Service Provider
Posts: 334
Liked: 23 times
Joined: Oct 09, 2012 2:30 pm
Full Name: Maso
Contact:

Re: Remove deleted item data after xx days

Post by masonit »

Hi!

Looking in v13. Still not possible to set this option with ps?

\M
david.domask
Veeam Software
Posts: 3199
Liked: 742 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Remove deleted item data after xx days

Post by david.domask »

Hi masonit,

Looks like this didn't make it on v13 release.

For a supported option, consider including REST API calls in your scripts, as the v13 REST API includes support for Backup Copy Jobs and specifically the deleted item retention.

For an unsupported method, you can use the following unsupported method:

Code: Select all

$bcj = Get-VBRBackupCopyJob -Name "name of job"
$job = Get-VBRJob | Where-Object {$_.Id -eq $bcj.id} #This will produce a warning about deprecated use of Get-VBRJob -- you can suppress with -WarningAction SilentlyContinue
$job.Options.GenerationPolicy.EnableDeletedVmDataRetention = $true
$job.Options.GenerationPolicy.DeletedVmsDataRetentionPeriodDays = "60"
$job.Update()
Above code will enable Deleted Machine Retention and set the Deleted Machine Retention period to 60.

However, I strongly recommend incorporate some REST code into your script to handle the Backup Copy jobs for now.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: saas and 71 guests