cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Database Backup Type on a Report

Blaine_Kinnebre
Level 2

I'm new to OpsCenter and for audit purposes I'm trying to build a custom SQL report that displays backup type.  When I say backup type I mean "full" or "transaction log".

We're using the Microsoft SQL Server NetBackup Database Extension to perform our backups.  Some of these database backups are full and some are transaction log.

The backups are generated by a SQL Server job that executes a PowerShell script.  This PowerShell script builds the appropriate database backup commands and places them in .bch file.

After PowerShell builds this .bch file it calls dbbackex.exe and passes the .bch file to dbbackex.exe.

In other words NetBackup is not initiating these backups.

I looked at using domain_JobArchive.backupType and domain_JobArchive.scheduleType but these values are not correlated to full or transaction log backups.

My current idea for resolving this issue is to create two different sets of policies.  One set of policy names would have the string "FULL" and the other would have "TLOG".  Parsing the policy name would then tell me which kind of backup was done.  I don't like this idea because I will have to maintain two sets of policies.

Does anybody have a better idea for resolving this one?

Thank you in advance,

Blaine

1 ACCEPTED SOLUTION

Accepted Solutions

areznik
Level 5

I believe that you can accomplish the same goal by creating 2 schedules. Both will be 'User Backup' type but you can change the schedule name. So one will be FULL the other TLOG. Then you can use domain_JobArchive.scheduleName to tell them apart.

You will need to modify/copy the script on the client side that's kicking off the backup to point to 2 different schedules but you would have had to do the same with 2 policies. 

View solution in original post

3 REPLIES 3

revarooo
Level 6
Employee

How could you tell if you had the backups under the same policy - it wouldn't be possible. Especially as this "FULL" and "Transaction Log" backups are not related to a Policy Name or Schedule.

You could also perhaps use a "Keyword phrase" in the Policy attributes too.

 

areznik
Level 5

I believe that you can accomplish the same goal by creating 2 schedules. Both will be 'User Backup' type but you can change the schedule name. So one will be FULL the other TLOG. Then you can use domain_JobArchive.scheduleName to tell them apart.

You will need to modify/copy the script on the client side that's kicking off the backup to point to 2 different schedules but you would have had to do the same with 2 policies. 

Blaine_Kinnebre
Level 2

Excellent idea, areznik!  I just tried your suggestion and it works like a charm.  I now just need to add two new schedules to my policies and modify some PowerShell code.  Thank you.  Thank you!