Forum Discussion

Sid1987's avatar
Sid1987
Level 6
8 years ago

bpdbjobs -all_columns

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

 

  • 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

  • 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's avatar
      Sid1987
      Level 6

      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's avatar
        quebek
        Moderator

        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...

  • 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's avatar
      Sid1987
      Level 6

      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.