The code is working as expected, the only problem is a job with multiple full backups ended successfully, return me multiple lines in the final table. How can I enhance the script to show me only the newer backup of each job?
Thanks.
Luca.
Luca Dell'Oca Principal EMEA Cloud Architect @ Veeam Software
Just an add: this script only shows completed full backups at first pass, if for some reason the full is completed after a retry for example (even for only a subset of the VMs included in the job) the job itself would not be listed by the script.
Luca.
Luca Dell'Oca Principal EMEA Cloud Architect @ Veeam Software
Thinking about it right now
I tried to add this in the original script in different positions as a -OR condition, but it return me the same small list, or the last retry execution regardless is a full or a reverse incremental... Not sure where and how to best place this piece of code...
Luca.
Luca Dell'Oca Principal EMEA Cloud Architect @ Veeam Software
Unfortunately, there are no retried jobs with successful full backup in my lab, thus, it’s a little hard to test.
However, you can try to implement something like this and see whether it works. This script should list all successful full backup sessions either the retry mode is $true or $false:
Uhm, seems the same list is coming out as in the previous version of the script.
Anyway, at this stage the script is ok, it's also a way to know if for some reason a backup job has NEVER been able to complete without error.
Luca.
Luca Dell'Oca Principal EMEA Cloud Architect @ Veeam Software
If it doesn’t, I will ask you to confirm that there are indeed retried full backup sessions which have finished successfully in your environment.
It can be done by running modified version of the script:
Ah, the second script returns no result, so it seems there are no retried full backups. Maybe this is the reason why changing the original script gives no difference in the results....
So I may say the last version of the script is good to be used...
Luca.
Luca Dell'Oca Principal EMEA Cloud Architect @ Veeam Software