Skip to main content

Enforce Backup Job Basic Retention

  • July 1, 2021
  • 7 comments
  • 273 views

Chris.Arceneaux
Forum|alt.badge.img+5

Here’s a sample PowerShell script to enforce Restore Point configuration for both VMware Backup Jobs & vCloud Backup Jobs. The script retrieves the job’s current retention setting (Restore Points), compares it against the standard defined in a CSV file, and adjusts the configuration where needed. For more detailed information, please follow the VeeamHub link:

https://github.com/VeeamHub/powershell/tree/master/BR-EnforceJobRetention

7 comments

Chris.Childerhose
Forum|alt.badge.img+21

Another great script to add to my collection.  Will give this one a go soon. @Geoff Burke 


Forum|alt.badge.img+3
  • Experienced User
  • July 1, 2021

@Chris.Arceneaux : Great one, Thanks for the update, Keep sharing !

 

 


vNote42
Forum|alt.badge.img+12
  • On the path to Greatness
  • July 5, 2021

Cool script @Chris.Arceneaux , thanks for sharing! When I understand the script right, it enables you to inject new number of restore points for VBR/Cloud jobs.

… as I read the headline, I thought it enables you to enforce current restore point number to the repositories. Should mean: reduce number of actual restore points to the number in definition, without running a backup.

If you write such a script too, then i volunteer to be a beta tester :sunglasses:


Chris.Arceneaux
Forum|alt.badge.img+5

@vNote42 I think my definition was sufficient:

This script looks for both VMware Backup Jobs & vCloud Backup Jobs, retrieves their current retention setting (Restore Points), compares the retention against the published standard (joblist.csv), and adjusts the configuration where needed.

Script allows you to do as mentioned which is enforce the number of restore points for each job. The workflow is pretty simple:

  • if (Job RP count == Configured RP count)
    • No changes are made
  • else
    • Job configuration is updated to match Configured RP count

vNote42
Forum|alt.badge.img+12
  • On the path to Greatness
  • July 8, 2021

@vNote42 I think my definition was sufficient:

This script looks for both VMware Backup Jobs & vCloud Backup Jobs, retrieves their current retention setting (Restore Points), compares the retention against the published standard (joblist.csv), and adjusts the configuration where needed.

Script allows you to do as mentioned which is enforce the number of restore points for each job. The workflow is pretty simple:

  • if (Job RP count == Configured RP count)
    • No changes are made
  • else
    • Job configuration is updated to match Configured RP count

Thanks Chris! By just reading the headline I thought it would do something different. Your description was in no uncertain manner! Sorry for the misunderstanding.


Geoff Burke
Forum|alt.badge.img+22
  • Veeam Vanguard
  • July 9, 2021

Another great script to add to my collection.  Will give this one a go soon. @Geoff Burke 

@Chris.Childerhose definitely! 


marcofabbri
Forum|alt.badge.img+12
  • On the path to Greatness
  • September 14, 2021

Cool script, thanks @Chris.Arceneaux