PowerShell script exchange
Post Reply
zuldan
Enthusiast
Posts: 45
Liked: 5 times
Joined: Feb 15, 2017 9:51 am
Contact:

How to get restore point count for a backup job?

Post by zuldan »

So I'm trying to work out the Powershell command to get the same restore point figures as what you see in the VBR GUI Console. I can never get the number to match up. Anyone see what I'm doing wrong?

Code: Select all

Get-VBRRestorePoint -Backup 'S12AUMDC01VVC01 - SQL Servers 02' | Group-Object -Property VmName | Select-Object -Property Name,@{Name='RestorePoints';Expression={$PSItem.Count}}
Image
tdewin
Veeam Software
Posts: 1775
Liked: 646 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: How to get restore point count for a backup job?

Post by tdewin »

Does it work better if you use get-vbrbackup as a source? For me this gives the exact same result:

Code: Select all

$job = "Backup Job AD"
$vm = "adalone"
$count = $(get-vbrbackup -name $job | Get-VBRRestorePoint -Name $vm | Measure-Object).Count
write-host $count
or with your code

Code: Select all

$job = "Backup Job AD"
get-vbrbackup -name $job | Get-VBRRestorePoint | Group-Object -Property VmName
zuldan
Enthusiast
Posts: 45
Liked: 5 times
Joined: Feb 15, 2017 9:51 am
Contact:

Re: How to get restore point count for a backup job?

Post by zuldan »

No luck with either. Both show 54 restore points per VM instead of 13 like the GUI.

Code: Select all

Count Name                      Group                                                                                                
----- ----                      -----                                                                                                
   54 S12AUMDC01SQL14           {Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib...}  
   54 S12AUMDC01SQL11           {Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib...}  
   54 S12AUMDC01SQL12           {Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib...}  
   54 S12AUMDC01SQL02           {Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib...}  
   54 S12AUMDC01SQL13           {Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib, Veeam.Backup.Core.COib...}
tdewin
Veeam Software
Posts: 1775
Liked: 646 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: How to get restore point count for a backup job?

Post by tdewin »

Don't experience it in my lab. Maybe, you could try investigating the dates

Code: Select all

Get-VBRRestorePoint -Backup $job | Group-Object -Property VmName | % { $vmg = $_;write-host $vmg.name; $vmg.Group | Sort-Object -Property creationtime -Descending | % { write-host $_.creationtime; };write-host ""}
Takes the properties of the backup, and see what dates are mismatching. If older dates are showing up, maybe you have residue data left.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How to get restore point count for a backup job?

Post by veremin »

Most likely, there are stuck entities inside product db. So, I recommend checking db with support team help. Thanks.
zuldan
Enthusiast
Posts: 45
Liked: 5 times
Joined: Feb 15, 2017 9:51 am
Contact:

Re: How to get restore point count for a backup job?

Post by zuldan »

Thanks v.Eremin. I'll open up a Veeam case.
zuldan
Enthusiast
Posts: 45
Liked: 5 times
Joined: Feb 15, 2017 9:51 am
Contact:

Re: How to get restore point count for a backup job?

Post by zuldan »

v.Eremin, before I open up a new case, I just had a thought. Is it possible this issue is related to case 02082443. Details at veeam-backup-replication-f2/veeam-exagr ... 41399.html
Mike Resseler
Product Manager
Posts: 8044
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: How to get restore point count for a backup job?

Post by Mike Resseler »

Zuldan,

That might be the case indeed. As I just read that other thread, I would wait for the result of that one. I think that one is the most urgent one and needs to be fixed as soon as possible. I can't help you there however. Our engineer will do its best to get this fixed and escalate when necessary.

From the moment that is done, we can come back to this one and see if the issue is still there

Mike
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests