7

I need to retrieve the list of backups on a system's backup volume via script. The information I am after can be found in the WSB GUI after clicking "View details" of the "Destination usage" part in the "Scheduled Backup" section:

details of backups

I know about the Get-WBBackupSet cmdlet, but this is only the list of backups WB knows it has done in the past, not necessarily what is present on the backup destination, which seems to be re-read dynamically each time I click "Refresh information":

Destination usage

How is Windows Server Backup gathering the destination information?

Rationale: I would like to set up monitoring for the backup runs performed by WB to make sure a sufficiently deep backup history is present. The list of backup sets returned by Get-WBBackupSet seems not always consistent with what's on disk, so I rather would not rely on this information for the monitoring check.

1
  • wabbit the result is not the same!! Get-WBBackupSet return entire catalog while wssadmin return only online shadow. Oct 6, 2015 at 18:54

2 Answers 2

1

I do not have WS2008R2 machine right away, but this is what I get on WS2012R2,

if issuing the command: wbadmin get versions

wbadmin get versions

UPD: If you run the command like: wbadmin get items -version:10/03/2015-16:01

You will get the following:

enter image description here

Is that what you are looking for?

1
  • wbadmin get versions seems to return the same list as Get-WBBackupSet, sorry.
    – the-wabbit
    Oct 6, 2015 at 14:47
0

With the command "wssadmin list shadows" you get the list of shadow copies. Now we can put the list in the PowerShell variable "$copy online"

$copyonline = vssadmin list shadows

So we have to only filter the results and count items.

($copyonline -like "*shadow Copy Volume*").count

The number is the copies available.

1
  • This answer needs more explanation.
    – kasperd
    Oct 6, 2015 at 13:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .