Daily Backup Report

PowerShell script exchange

Daily Backup Report

Veeam Logoby romura » Fri May 02, 2014 1:09 am

Is there any way to provide a daily detailed backup report of each VM using powershell? I like the reports that spit out after every job but I need that consolidated into one report that's emailed daily. I've searched these forums and tried some of the powershell examples but no luck. Maybe it's because I'm on VBR 7 and most of the scripts were made for v6 and below?

Any help or examples would be appreciated.
romura
Influencer
 
Posts: 13
Liked: never
Joined: Fri Aug 19, 2011 9:24 pm

Re: Daily Backup Report

Veeam Logoby Vitaliy S. » Fri May 02, 2014 2:05 pm

Hi romura,

Let's wait what our PowerShell guru can offer you, meanwhile if you need this info right now, you may want to take a look at predefined backup reports in Veeam ONE.

Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Daily Backup Report

Veeam Logoby soehl » Fri May 02, 2014 3:44 pm

What do you need exactly?! All the informations from the normal emails or just a list with the backuped vms?!

This little code snippet generates a CSV-file on Desktop, with all backup sessions in the last 24 hours.
Maybe it is a good starting point:

Code: Select all
if ((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null) {Add-PsSnapin VeeamPSSnapIn}

$outputfile = "$env:UserProfile\Desktop\backupedvms.csv"

$vbrsessions = Get-VBRBackupSession | Where-Object {$_.JobType -eq "Backup" -and $_.EndTime -ge (Get-Date).addhours(-24)}
$backupedvms = foreach ($session in $vbrsessions) {$session.gettasksessions()| Select Name, Status, Jobname }
$setarray = @("Name", "Status", "JobName")
$backupedvms | Select-Object -Property $setarray | Export-CSV -Encoding "UTF8" -NoTypeInformation $outputfile


best regards
soehl
Enthusiast
 
Posts: 35
Liked: 4 times
Joined: Mon May 09, 2011 12:43 pm
Location: Germany
Full Name: Sebastian

Re: Daily Backup Report

Veeam Logoby romura » Fri May 02, 2014 6:48 pm

Thank you Soehl! This would be a good starting point.

It would be nice to get all the information from the normal emails with backup sizes, times, etc. all together in one. We have a lot of backup jobs so the normal emails would just be a lot of SPAM to other admins and management that get it.
romura
Influencer
 
Posts: 13
Liked: never
Joined: Fri Aug 19, 2011 9:24 pm

Re: Daily Backup Report

Veeam Logoby romura » Sat May 03, 2014 1:44 am

romura
Influencer
 
Posts: 13
Liked: never
Joined: Fri Aug 19, 2011 9:24 pm

Re: Daily Backup Report

Veeam Logoby Gav@GH » Sun May 18, 2014 1:38 pm

Glad you liked it! I randomly jumped on the forum tonight looking for a few ideas for something else I'm working and saw your post. Let me know if you have any questions, tips or bug fixes.
Gav@GH
Influencer
 
Posts: 21
Liked: 15 times
Joined: Fri Jul 20, 2012 12:27 am


Return to PowerShell



Who is online

Users browsing this forum: Bing [Bot] and 3 guests