PowerShell script exchange
Post Reply
MaPf
Enthusiast
Posts: 30
Liked: 2 times
Joined: Apr 07, 2020 6:23 pm
Full Name: Markus Pfohl
Contact:

Get secondary retention with powershell

Post by MaPf »

I can see the primary retention of all jobs with the following script

Code: Select all

Asnp VeeamPSSnapin
$Jobs = Get-VBRJob
foreach ($Job in $Jobs)
{
$jname = $job.name
$Options = $Job.GetOptions()
$retentionpri=$Options.backupstorageoptions.retaincycles
Write-Host "$jname Primary: $retentionpri"
}
How can I insert the retention of the secondary target?
Some backup-jobs are repository-based and others based on Netapp Snapshots.
The former are transported with backup-copy-jobs, the latter with ONTAP Snapvault

The list I get with above script does include the backup-copy jobs, so this is covered. (for the output it would be nice to have that in the same line as the primary job)
But for the Snapvaults I can't seem to find the correct command.

Best regards
Markus
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get secondary retention with powershell

Post by oleg.feoktistov »

Hi Markus,

Since it's related to san storage integration, these configs are located in the other property:

Code: Select all

$job = Get-VBRJob -Name 'Backup Job'
$options = Get-VBRJobOptions -Job $job
$options.SanIntegrationOptions
Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests