2017-01-06 01:59 AM
I've been a SQL Server DBA for a while, but I'm new to SnapManager. What I'm trying to do is create an automated system for checking that databases have been backed up (either natively or through SnapManager), and that the backup devices still exist at the time of the checks. I know how to do this for native backups, but is there a PowerShell (or other) command that will check that the SnapManager backup of a particular database hasn't been deleted between when it was made and when it was checked, please?
2017-01-09 02:48 AM - edited 2017-01-09 02:49 AM
OK, I think I need to use the Get-Backup cmdlet. So I type in this...
Get-Backup –Svr MYSERVER -Inst MYSERVER -D MyDB -SnapInfo \\MYSERVER\X$\SnapInfoFolder
which gives this result:
Connecting to server: [MYSERVER] [processing]
Connecting to server: [MYSERVER] [completed]
Number of Backups = 5.
According to the documentation, Get-Backup is supposed to list the backups, not count them. Have I missed something important?