cancel
Showing results for 
Search instead for 
Did you mean: 

How to identity Status of a backup using Netbackup CLI ?

vengateshs
Not applicable

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.

Any help is highly appreciated.

2 REPLIES 2

Nicolai
Moderator
Moderator
Partner    VIP   

What do you have in mind with "corresponding JobId".

Is the Netbackup status code returned from bpbackup -w not what you need to determine if a backup job has successful completed or not ?

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

The bpbackup -w option causes the shell to wait for a return code. The operating system shell can only return one return code. Therefore, if you use -w without specifying a wait time or you specify a value of 0, NetBackup waits indefinitely for the completion status.

Jharna
Level 2
Employee

From the NetBackup Commands Reference guide -

 

By default, you return to the system prompt after bpbackup is successfully submitted.
The command works in the background and does not return completion status directly to you.
The -w option lets you change this behavior so the command works in the foreground. It returns completion status after a specified time period.