10-14-2020 08:05 AM
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
Solved! Go to Solution.
10-16-2020 12:31 AM - edited 10-16-2020 12:40 AM
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/
10-14-2020 08:26 AM
I'm unsure what you're asking about. Are you running bpbackup and the backup is failing? If so, what error code?
Are you running bpbackup and it completes successfully but the files aren't being deleted after a successful backup? That would be because you should be using bparchive to achieve that result.
10-14-2020 09:49 AM
Should I ran the command line this way and read the exit.txt file to check the result. If its empty, the backup was fine.
I woul like a command that I fire from the client tha ran the job to check if the backup has finished fine. Is there this command?
/usr/openv/netbackup/bin/bpbackup -p $POLITICA -s $SCHEDULE -w 0 -f $DIRETORIOS &> exit.txt
bash-3.2$ more exit.txt
EXIT STATUS 96: unable to allocate new media for backup, storage unit has none available
10-14-2020 10:09 AM
10-14-2020 11:44 PM
10-16-2020 12:31 AM - edited 10-16-2020 12:40 AM
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/