Forum Discussion

Deb_Techie's avatar
Deb_Techie
Level 4
11 years ago

How to identity Status of a backup using Netbackup CLI ?

I launch 'bpbackup' command in my program and it just gives the return code. There is no way to know the corresponding JobId.

Before I launch the next backup, I want to check the status of the Previous backup and make some decision.

'bpimagelist' command can be used with 'keyword' as filter so that I can search my backup job uniquely. Problem is, it only lists the Successful backups. 

'bpdbjobs' command can be used to list out all jobs (successful, failed, in progress) but there is no way to uniquely find the backup job because it does not support filtering the result with 'keyword' attribute.

Also Want to filter the status of individual client what I still not able to get using bpdbjobs.

 

Any help is highly appreciated.

Deb

  • The status of backups report uses the bperror command - several switches in there and this will report on running and completed backups - take a look to see if that helps you

     

5 Replies

  • I also like the use of the -L logfile as it gives you information that you can use well after the job has since been removed from the Activity monitor. And you can tail -f the logfile for current time information as the backup is running.

  • Please check the -w and -L option for bpbackup

    -w wait until the backup has finished before returning a status code. The return code is Netbackup status code

    -L log the progress of the backup in a text file.

    http://www.symantec.com/docs/HOWTO43639

     

  • Try something like:

    bperror -backstat -hoursago 24 -U

    The above will give you 'backup status report'.

    As Mark said - many more options and switches.

    Have a look at NBU Commands manual.

    • ANUJ_KUMAR's avatar
      ANUJ_KUMAR
      Level 0

      If you use

      below command, it will give the error by status code

      bperror -backstat -by_statcode -hoursago 24 -U

  • The status of backups report uses the bperror command - several switches in there and this will report on running and completed backups - take a look to see if that helps you