Comprehensive data protection for all workloads
Post Reply
Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Report on the number of restore points for a server

Post by Brad.Morris »

Hi there,

I want to be able to find a way to report on all the restore points for a server over multiple backup jobs. But have no idea how to do this.

Cheers,
Brad.
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Report on the number of restore points for a server

Post by nielsengelen »

What exactly do you need? Just the backup job with the VM's and the amount of their restorepoints? Or do you need additional info about the restore points as well? This can be done via PowerShell if you know what exactly you need/want :-)
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Re: Report on the number of restore points for a server

Post by Brad.Morris »

Over time I have multiply jobs that have backed up the same server. Some are daily backups, others are long term archives. What I would like to do is get a report that shows the jobs, dates of the restore points and their status if possible.
Hope that answers your question.
tdewin
Veeam Software
Posts: 1818
Liked: 655 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: Report on the number of restore points for a server

Post by tdewin »

This can be done with powershell. Here is a sample script exporting it to csv

Code: Select all

asnp veeampssnapin

$backups = get-vbrbackup
$allstorages = @()

foreach ($backup in $backups) {
  foreach ($storage in $backup.getallstorages()) {
   $allstorages += New-Object -TypeName psobject -Property @{
    JobName=$backup.Name;
    Time=$storage.CreationTime;
    Path=$storage.Info.FilePath;
    BackupSizeGB=$storage.Info.Stats.BackupSize/1GB;
    DataSizeGB=$storage.Info.Stats.DataSize/1GB;
    }
  }
}
$allstorages = $allstorages | Sort-Object -Property JobName,Time
$allstorages | select -property Jobname,Time,Path,BackupSizeGB,DataSizeGB | ConvertTo-Csv -Delimiter "," > c:\export.csv
Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Report on the number of restore points for a server

Post by Shestakov »

Brad, if the goal is to find out which VMs are backed up by multiple jobs you can use the corresponding Veeam ONE report.
Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Re: Report on the number of restore points for a server

Post by Brad.Morris »

tdewin wrote:This can be done with powershell. Here is a sample script exporting it to csv

Code: Select all

asnp veeampssnapin

$backups = get-vbrbackup
$allstorages = @()

foreach ($backup in $backups) {
  foreach ($storage in $backup.getallstorages()) {
   $allstorages += New-Object -TypeName psobject -Property @{
    JobName=$backup.Name;
    Time=$storage.CreationTime;
    Path=$storage.Info.FilePath;
    BackupSizeGB=$storage.Info.Stats.BackupSize/1GB;
    DataSizeGB=$storage.Info.Stats.DataSize/1GB;
    }
  }
}
$allstorages = $allstorages | Sort-Object -Property JobName,Time
$allstorages | select -property Jobname,Time,Path,BackupSizeGB,DataSizeGB | ConvertTo-Csv -Delimiter "," > c:\export.csv
Is this for V8 or V9? Or does it matter? As when I try to run it from the Veeam Powershell window I get heaps of errors.
Method invocation failed because [Veeam.Backup.Core.CBackup] doesn't contain a method named 'getallstorages'.
At C:\Script\jobs.ps1:7 char:24
+ foreach ($storage in $backup.getallstorages()) {
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Re: Report on the number of restore points for a server

Post by Brad.Morris »

Shestakov wrote:Brad, if the goal is to find out which VMs are backed up by multiple jobs you can use the corresponding Veeam ONE report.
Is that a V9 report? I cannot find it in V8.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Report on the number of restore points for a server

Post by veremin »

Shestakov
Veteran
Posts: 7328
Liked: 781 times
Joined: May 21, 2014 11:03 am
Full Name: Nikita Shestakov
Location: Prague
Contact:

Re: Report on the number of restore points for a server

Post by Shestakov »

Vladimir is correct, it`s in Veeam ONE Reporter > Veeam Backup and replication report pack.
tdewin
Veeam Software
Posts: 1818
Liked: 655 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: Report on the number of restore points for a server

Post by tdewin »

Script is v9 tested, I think in v8, the "GetStorages()" function does the same as "GetAllStorages()" in v9 but I do not have an old installation in place to quickly test it.
Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Re: Report on the number of restore points for a server

Post by Brad.Morris »

tdewin wrote:Script is v9 tested, I think in v8, the "GetStorages()" function does the same as "GetAllStorages()" in v9 but I do not have an old installation in place to quickly test it.
Changing to "GetStorages()" worked. But it is not what doing what I need. I want to be able to search for a VM and find all the jobs that it is backed up by.
Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Re: Report on the number of restore points for a server

Post by Brad.Morris »

v.Eremin wrote:It should be available in Veeam ONE version 8 as well. Thanks.
Is this in the free version or the full version?
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Report on the number of restore points for a server

Post by veremin »

Backup reports are available only in paid versions of Veeam ONE. Thanks.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 75 guests