cancel
Showing results for 
Search instead for 
Did you mean: 

bpdbjobs -all_columns

Sid1987
Level 6
Certified

Hi Techiz,

 I am trying to drill down some details from command line, I am choosing bpdbjobs, However I am open to suggestions about any other command or log which can be added with it.

I need following

1. Date wise selection from activity monitor, I need to select a particular date range let say today's and select all the jobs from last 24 hours.

2. For the jobs which have failed what is the detailed section of the job says.

3. For multistream jobs like oracle or db2, has all the child jobs completed, if yes I want to specifically check if control file is backed up. so that can say the backup of oracle database is successful for sure.

4. If a job is failed what is the last successful backup of that client or database (bpimagelist can provide it)

 

Thanks

Sid

 

1 ACCEPTED SOLUTION

Accepted Solutions

quebek
Moderator
Moderator
   VIP    Certified

Hey

bpdbjobs can be used for this if you will have proper COL_DEFS in place - quote from man bpdbjobs....

so the switch -all_columns should be used only later on against failed jobs etc...

"To customize the output of bpdbjobs, add column definition entries (BPDBJOBS_COLDEFS) in the bp.conf file.

See the NetBackup Administrator's Guide, Volume I for more information about the following: the bp.conf file, a
complete list of the definitions, and the BPDBJOBS_COLDEFS"

Having this COLDEFS in palce you can grep for period of time, check the status - if exit code != 0 manipulate on this job ID with bpdbjobs etc... grep, awk, sed are your friends...

In my env I use such COLDEFS:

BPDBJOBS_COLDEFS = JobID 5 true
BPDBJOBS_COLDEFS = Type 4 true
BPDBJOBS_COLDEFS = State 5 true
BPDBJOBS_COLDEFS = Status 3 true
BPDBJOBS_COLDEFS = Policy 9 true
BPDBJOBS_COLDEFS = Schedule 10 true
BPDBJOBS_COLDEFS = Client 8 true
BPDBJOBS_COLDEFS = Started 16 true
BPDBJOBS_COLDEFS = Ended 16 true
BPDBJOBS_COLDEFS = Elapsed 10 true
BPDBJOBS_COLDEFS = Kilobytes 10 true
BPDBJOBS_COLDEFS = Files 6 true
BPDBJOBS_COLDEFS = KBPERSEC 6 true

View solution in original post

10 REPLIES 10

quebek
Moderator
Moderator
   VIP    Certified

Hey

bpdbjobs can be used for this if you will have proper COL_DEFS in place - quote from man bpdbjobs....

so the switch -all_columns should be used only later on against failed jobs etc...

"To customize the output of bpdbjobs, add column definition entries (BPDBJOBS_COLDEFS) in the bp.conf file.

See the NetBackup Administrator's Guide, Volume I for more information about the following: the bp.conf file, a
complete list of the definitions, and the BPDBJOBS_COLDEFS"

Having this COLDEFS in palce you can grep for period of time, check the status - if exit code != 0 manipulate on this job ID with bpdbjobs etc... grep, awk, sed are your friends...

In my env I use such COLDEFS:

BPDBJOBS_COLDEFS = JobID 5 true
BPDBJOBS_COLDEFS = Type 4 true
BPDBJOBS_COLDEFS = State 5 true
BPDBJOBS_COLDEFS = Status 3 true
BPDBJOBS_COLDEFS = Policy 9 true
BPDBJOBS_COLDEFS = Schedule 10 true
BPDBJOBS_COLDEFS = Client 8 true
BPDBJOBS_COLDEFS = Started 16 true
BPDBJOBS_COLDEFS = Ended 16 true
BPDBJOBS_COLDEFS = Elapsed 10 true
BPDBJOBS_COLDEFS = Kilobytes 10 true
BPDBJOBS_COLDEFS = Files 6 true
BPDBJOBS_COLDEFS = KBPERSEC 6 true

Sid1987
Level 6
Certified

Thanks quebec,

I am aware of coldef, However i belive started and ended time comes in epoch time right? I will confirm it though, so you are suggesting use job id for further grilling in all_columns entry?

You are using this entries in your env for some report fetching or for what purpose?

 

quebek
Moderator
Moderator
   VIP    Certified

Hi

In short yes...

so once you will identify your 'suspect' jobs with pure bpdbjobs then you can engage the bpdbjobs -jobid XX -all_columns to look after what you are willing to see...

Nicolai
Moderator
Moderator
Partner    VIP   

3: Just because all sub jobs have succeeded, doesn't necessary mean the backup is good. You should only trust the result from the database backup utility .e.g RMAN.

Sid1987
Level 6
Certified

Thanks Nicolai for your comment,

 I know all jobs being successful can't make sure I have successful backup, so what would you suggest for a process to make sure backup is successful from master server end, I can't run rman commands to query the client. How would you check from command line if a database backup is successful or not.

sdo
Moderator
Moderator
Partner    VIP    Certified

You can't.  The DBA can.

Sid1987
Level 6
Certified

So there is no way you can make sure successful database backup from netbackup end? Just rely on status code, if it's 0 assume it would be successful?

sdo
Moderator
Moderator
Partner    VIP    Certified

Isn't that how all backup products work?   We take the status code of a backup job, and for the most part we assume that this means that the backup worked.  This is is not the same thing as assuming that the backup will be restorable.  These are two different assumptions.

It sounds to me like your site requirements (of low to zero assumptions) dictates that you need to peform some very regular restores.

Sid1987
Level 6
Certified

Yes we get frequenct restores, and about relying on status code when it comes to filesystem backups there are very few or none cases when data is not restorable from 0 status code filesystem backup, However when it comes to database backup you might see situations when backup are successful but data is not restorable.

quebek
Moderator
Moderator
   VIP    Certified

Sid1987

In my env all backups of DBs are being scheduled by DBA - by doing so we are (or DBA) sure that the ran backup was successful. Of course it has its down sides - no central scheduling, ie on Master Server - but the issue you are trying to solve could be solved in this way. So for your DB policies create schedules for user-backup, no backup selection list and have DBA to do their job ;). My DBA have a web page where they do post backup results... This is really useful with rman based backups as there is so many streams that for me as NBU admin is really hard figure out sometimes if all went fine...