Comprehensive data protection for all workloads
Post Reply
sheehanje
Novice
Posts: 8
Liked: never
Joined: Apr 13, 2012 3:00 pm
Full Name: John Sheehan
Contact:

Backed up vs. not backed up reporting

Post by sheehanje »

I was wondering if there is any type of reporting functions in VEEAM that would allow me to list what virtual machines are backed up and which are not backed up?

This would be helpful in a few instances. First off, we are migrating backups from CommVault, and because we run several separate backup jobs, it would be helpful to compare lists. It would also point out any backup weaknesses as VM's tend to sprawl sometimes, especially when we have many projects running at once. Not to mention, it would be nice to go to upper management once in a while and say "hey, right now we are covered and are servicing what we need to." Or, "Hey, these machines aren't in the backup scheme, we may need to budget for more backup storage."

Thanks in advance,

John
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Backed up vs. not backed up reporting

Post by dellock6 » 1 person likes this post

Hi John, funny enough I'm working on this exact issue, involving some powershell scripting in the process. Right now I'm out of office, I would later share my first scripts here, so we can also try to complete it. Give me some hours...

I'm also preparing a blog post about it with the whole howto.

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Backed up vs. not backed up reporting

Post by Vitaliy S. »

Hi John,

Your use cases make perfect sense to me, thanks for bringing this to our attention. Currently there are no such reports, but as a workaround you can get the list of VMs being backed up through PowerShell scripts (seems like Luca is already implementing them :)).

Btw, is there any other report you would like to see in Veeam B&R?

Thanks!
Gostev
Chief Product Officer
Posts: 31455
Liked: 6646 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Backed up vs. not backed up reporting

Post by Gostev »

This is an excellent feature request, John. If you and Luca could tell us what reports exactly would you like to see, that would help us tremendously and may speed up the delivery of this feature. Thank you in advance for your time.
lobo519
Veteran
Posts: 315
Liked: 38 times
Joined: Sep 29, 2010 3:37 pm
Contact:

Re: Backed up vs. not backed up reporting

Post by lobo519 »

Just an my 2 cents:

If there were a column in the list of VMs in the "Virtual Machines" section that listed the name of the job(s) it was being backed up in would be helpful.
Cokovic
Veteran
Posts: 295
Liked: 59 times
Joined: Sep 06, 2011 8:45 am
Full Name: Haris Cokovic
Contact:

Re: Backed up vs. not backed up reporting

Post by Cokovic »

Cant tell you exactly how my colleague has done this but we do have such scripts giving us a mail if a VM has not been backed up for two days. Every backup job is setup to write some notes into a custom VMWare field (in our case its called Veeam) and this is somehow compared with the backups made. Can check that tomorrow as i'm on my way home right now.
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Backed up vs. not backed up reporting

Post by dellock6 » 2 people like this post

Hi,
finally back home, so here is how I'm doing it (or at least trying to...). First of all, thanks to Seth Bartlett from Veeam for the powershell code, I really suck at coding so he helped me to translate my idea into the code.

First of all, you need to run this script against you Veeam server via powershell:

Code: Select all

Get-VBRJob | ?{$_.IsBackup} | %{$opt = $_.Options; $opt.ViSourceOptions.VmAttributeName = "VeeamBackup"; $opt.ViSourceOptions.SetResultsToVmNotes = $true;$_.SetOptions($opt)}
This has to be one-liner, and it will set the VM notes option to all the Backup jobs inside Veeam. The VMnotes will be called "VeeamBackup" and it will be then registered into vCenter database. After a successful run of a backup, every VM will have this value configured, and something like this:

Veeam Backup: Job name: [BKP-vcloud_mgm_vCloud] Time [27.06.2012 02:37:59], Backup host [VEEAMMGR], Backup file [[This server] VEEAMMGR:B:\Backups\BKP-vcloud_mgm_vCloud\BKP-vcloud_mgm_vCloud2012-06-26T210318.vbk

Then, run this other script against vCenter server, please check before the date format of your server:

Code: Select all

function get-backedup ($vm)
{
$val = $vm.CustomFields |where {$_.key -eq "VeeamBackup" } | select -ExpandProperty Value
$today = Get-Date -Format "dd/MM/yyyy"
$backupDate = $val.Value
}

$vms = get-vm
foreach ($vm in $vms)
{
  if (get-backedup($vm)) {
      write-host -foregroundcolor green "$vm is backed up"
  } else {
      write-host -foregroundcolor red "$vm is NOT backed up"
  }
}
If the backup has the same date of the script when it's running, you will see a lists of all your VM, green if you have a backup made today, red if not.

Please, test it and give me feedback if it's working, I would also like to improve the second script to make it search for a week-old backup, I'm not sure it will work if backups are running across midnight.

Also, post here some screenshots of the result, I would like to use them for my blog post.

Thanks!!
Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Backed up vs. not backed up reporting

Post by dellock6 »

Up!
Did someone was able to test those scripts and can give me a feedback?

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
dschrader@iu17.org
Influencer
Posts: 18
Liked: 4 times
Joined: Jan 26, 2012 3:23 pm
Full Name: Daniel Schrader
Contact:

Re: Backed up vs. not backed up reporting

Post by dschrader@iu17.org » 2 people like this post

I think a reporting function built into Veeam would be great. The history is a great resource to have and to be able to look back at jobs that were ran months ago is great. But if I was able to run a report on all of the information that the history gave me that would be great. Reports on Storage, Bottlenecks, Successful and Failed backup jobs, Length of time jobs take, Averages, min and max, etc.

Maybe even a report that gave me an estimate on how many more backups I could run before my storage ran out. I think that report would be used by a ton of people when they are trying to get administration to buy them a new backup server.

Thanks,
Dan
Gatoo
Novice
Posts: 6
Liked: 1 time
Joined: Jul 06, 2012 4:55 pm
Full Name: Gatien GHEZA
Contact:

Re: Backed up vs. not backed up reporting

Post by Gatoo »

These two scripts are great. But as we use Notes a lot to describes function of all VMs, does the Note is added to existing notes or does it replace it?
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Backed up vs. not backed up reporting

Post by dellock6 »

They are other notes, so they would not overwrite the notes you see in the VM settings.

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
mooreka777
Influencer
Posts: 18
Liked: 1 time
Joined: Jan 20, 2011 1:05 pm
Full Name: K Moore
Contact:

Re: Backed up vs. not backed up reporting

Post by mooreka777 »

I just tried the above and the $val.time variable shows empty no matter what I do. Any idea what is wrong?

PowerCLI D:\> $val
Veeam Backup: Job name: [PVLDCSPS2[012]] Time [7/13/2012 3:00:58 AM], Backup ho
st [PVLDCVVB20], Backup file [[This server] PVLDCVVB20:\\VEEAM-TARGET67\LDC-WIN
-PROD-B\PVLDCSPS2_012_\PVLDCSPS2_012_2012-07-13T030054.vib]

PowerCLI D:\> $val | fl *
Veeam Backup: Job name: [PVLDCSPS2[012]] Time [7/13/2012 3:00:58 AM], Backup ho
st [PVLDCVVB20], Backup file [[This server] PVLDCVVB20:\\VEEAM-TARGET67\LDC-WIN
-PROD-B\PVLDCSPS2_012_\PVLDCSPS2_012_2012-07-13T030054.vib]

I guess I could use regex to pull the info, but there has to be a cleaner way?? Any other ideas??

Thanks,
Kelly
tsightler
VP, Product Management
Posts: 6009
Liked: 2842 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Backed up vs. not backed up reporting

Post by tsightler »

In case anyone following this thread might be interested I have posted a similar script that I have been working on that performs this function and does not depend on parsing the status from the notes or custom attribute fields. I took this slightly different approach because I sometimes work with customers that, for whatever reason, cannot write back to vCenter due to policy or other reasons, or partners that want to be able to run a report when they visit a client site without waiting for the next backup run. I've posted my current work on this at this thread.
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Backed up vs. not backed up reporting

Post by dellock6 »

Hi Tom,
thanks for your scripts! I'm going to your thread to add my findings after some tests.
Great job!

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
Post Reply

Who is online

Users browsing this forum: Google [Bot], tedeme and 169 guests