Command to list the status of a job from a client
Hi, everybody
I am using the /usr/openv/netbackup/bin/bpbackup to perform a User Backup and I have to remove the files that were backuped successfully. What command should I fire from my client to list this backup status (example 0 - succesfull, 1 - partial , 96 - unable to allocate new media)?
There aren´t bperror and bpdbjobs on client install.
My client is a Oracle Linux 7.8, Netbackup client version 7.7.3.
Thanks
hi andrich2016
Use the -w parameter if you need to check status of the bpbackup command.
When using the -w qualifier, bpbackup wont return to the command prompt, but wait until the backup job is complete, and bpbackup exit code will be the status of the backup.
I have used the same trick many time before to ensure a client initiated backup is OK.
Exit code from a command in Linux/UNIX is stored in the variable $? and return value shoudl be check as first command after the bpbackup command.
Pls See: https://www.cyberciti.biz/faq/bash-get-exit-code-of-command/