-
- Service Provider
- Posts: 36
- Liked: 5 times
- Joined: Jul 13, 2020 7:10 am
- Full Name: Ayhan Dönmez
- Contact:
Retention Script
Hello All,
I need a script which show me retention informations like that.
Job Name| Retention |Retention Type
ABC | 7 | Days
KLM | 3 | Restore Points
XYZ |10 | Days
QWE| 14 | Restore Points
I found some scripts but they did not show me 'Days'. Have you got any idea?
Regards
I need a script which show me retention informations like that.
Job Name| Retention |Retention Type
ABC | 7 | Days
KLM | 3 | Restore Points
XYZ |10 | Days
QWE| 14 | Restore Points
I found some scripts but they did not show me 'Days'. Have you got any idea?
Regards
-
- Product Manager
- Posts: 2578
- Liked: 707 times
- Joined: Jun 14, 2013 9:30 am
- Full Name: Egor Yakovlev
- Location: Prague, Czech Republic
- Contact:
Re: Retention Script
Hi Ayhan,
guess you are looking for:
/Cheers!
guess you are looking for:
Code: Select all
$JobOptions = Get-VBRJob -Name "JobName" | Get-VBRJobOptions
$JobOptions.BackupStorageOptions.RetentionType
-
- Service Provider
- Posts: 36
- Liked: 5 times
- Joined: Jul 13, 2020 7:10 am
- Full Name: Ayhan Dönmez
- Contact:
Re: Retention Script
Hello Egor,
Thank you for useful informations. I used following script but it gives wrong information about Retention information. It shows me retention 7 but real value is 30.
Script:
Regards
Thank you for useful informations. I used following script but it gives wrong information about Retention information. It shows me retention 7 but real value is 30.
Script:
SS:Get-VBRJob | ? {$_.jobtype -eq "Backup"} |
Select-Object -Property @{N="Job Name"; E={$_.name}}, @{N = "Storage Retention"; E={$_.GetOptions().BackupStorageOptions.RetainCycles}}, @{N = "Retention Type"; E={$_.GetOptions().BackupStorageOptions.RetentionType}} | Format-Table -AutoSize
Regards
-
- Veeam Software
- Posts: 2010
- Liked: 669 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Retention Script
Hi Ayhan,
RetainCycles property reflects retention for RestorePoints type, for Days type RetainDaysToKeep property is what you should be retrieving:
Thanks,
Oleg
RetainCycles property reflects retention for RestorePoints type, for Days type RetainDaysToKeep property is what you should be retrieving:
Code: Select all
@{N = "Storage Retention"; E={$_.GetOptions().BackupStorageOptions.RetainDaysToKeep}}
Oleg
-
- Service Provider
- Posts: 36
- Liked: 5 times
- Joined: Jul 13, 2020 7:10 am
- Full Name: Ayhan Dönmez
- Contact:
Re: Retention Script
Hi Oleg,
Thank you for your interest. Finally I can use powershell for retentions
Regards,
Thank you for your interest. Finally I can use powershell for retentions
Regards,
Who is online
Users browsing this forum: No registered users and 21 guests