Find the latest version here.
Here we are with another update to My Veeam Report. Boy, has this report come a long ways!
This is quite a large update with many additions that folks have been asking for – hopefully I’ve hit the mark. Instead of a long boring list of what’s new, I’ll highlight the big items. For a full list of changes see the VersionInfo region of the script.
Am I Protected?
VM Backup Protection status has earned it’s own summary section. Keeping a close eye on jobs is nice but what if someone forgot to add the latest VM to a backup job? This area looks at your entire VMware infrastructure and reports what VMs have, or have not, been backed up in the last x hours/days.
We now distinguish between successful backups and backups that ended in warnings. If you work a lot with Application Aware processing and databases for example, you know that a warning can be sometimes rather bad/important. Maybe your database didn’t get properly backed up? Doesn’t do much good to have a working OS if your database is going to fall flat after a restore!
Additional Job Types
I’m happy to say I finally got around to bringing more of what VBR can do into the report. No longer are we restricted to just Backup and Endpoint jobs, we can now report on Replication, Backup Copy, Tape Backup and SureBackup jobs as well! This should cover much of the core functionality of VBR in a VMware environment. These new job type sections follow a similar structure as the existing backup sections.
New Report Sections
A few new report sections were added including Backup Size (total), Session info has been expanded and individual Tasks included. A few job type specific sections were added such as Waiting Tape Sessions (waiting on tape change) and Idle Backup Copy Sessions. A handful of sections were created for Tapes including expired tapes and tapes written to in last x hours/days. Configuration Backups and Scale-Out Repositories both have their own sections now too.
We now have the ability to run the report against just a single job (any flavor)! I know this has been a request for a while now and I finally cleaned up the code enough to do so.
I spent a fair amount of time trying to clean up some of the older code. I tried my best to get it to a point that was easy to understand and follow. I am fully aware that I am not able to create a report that is going to be perfect for everyone. My hope here is that I have given you enough to be able to customize yourself further if desired. The cleanup as well as the addition of only running the heaviest commands if needed has helped speed up the report tremendously (mostly notable on larger environments). In the end the report is still a bit messy, inconsistent and could probably be written by a developer in one tenth the amount of code…but it works 😉
As the script is now 3x the size prior, I am not going to include it within the post, I’ll just link to the gist here.
Download the zip or copy and paste into a .ps1 file.
The next step is to configure the (many!) script options which is done in the User-Variables region. There are three variables that must be configured before running.
Add your VBR server name
# VBR Server (Server Name, FQDN or IP) $vbrServer = "yourVBRserver"
Ensure the path to the Veeam executable is correct
# Location of Veeam executable (Veeam.Backup.Shell.exe) $veeamExePath = "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Shell.exe"
Configure Email Settings (or optionally the ‘Save HTML output to file’ section)
# Email configuration $sendEmail = $true $emailHost = "smtp.yourserver.com" $emailUser = "" $emailPass = "" $emailFrom = "MyVeeamReport@yourdoamin.com" $emailTo = "email@example.com"
That should be enough to get you started. I would recommend leaving the rest as is and just seeing what you get for output (it may be a lot depending on the size of your environment!). From there you can determine what is most important to you and tweak the settings as you desire. As there are so many items returned from the script I foresee some folks setting up multiple scripts for best results. For example, one script to run a daily report on backups, another weekly report for Tape Backup Jobs and possibly another that just lists expired tapes on Fridays – it’s completely up to you, your processes and the size of your environment.
There were a couple of changes to the way the data is gathered and I wanted to clarify what will be returned.
All job types behave in a similar manor but lets take a look at Backup jobs for the last 24 hours. Previously the last 24 hours only included jobs that were created within that time frame. This has changed to include any jobs that were created within the time frame as well as any jobs that ended within the time frame. For many folks this won’t have much of an effect. If your jobs all run between midnight and 4am and you run a report at 8am – you will see the same results as before. If you have a large backup window or when it comes to continuous job types (Backup Copy/Tape Backup) things can get a little tricky. Hopefully this will help you understand why you are getting the data you are.
Along the same note, things can also get tricky when using the ‘Only Show last Session’ option for a job. This is pretty straight forward for most jobs but Backup Copy jobs in particular act differently than the others due to the continuous nature of the job. You may find the ‘last session’ is sitting idle and hasn’t performed any tasks.
In these scenarios, you may need to get creative in your scheduling to ensure you are getting the data you expect.
Which leads me to…
Though I have tried my best to test every possible outcome of the report, I will not be astonished if I have overlooked or fat-fingered something along the way. Please do us all a favor and validate the output against your console to ensure the data returned is correct. If you find something off, please let me know so everyone can benefit from the fix.
Lastly, I would once again like to thank all the past and present contributors to this project. I’m not sure I would have had the motivation to start and continue this project entirely on my own and am grateful for all whom have given advice, insight, tested and/or contributed.