Triggering a backup from a NetBackup client
Hello, We are looking for options on triggering backups from NetBackup clients. At this point UNIX/LINUX clients. I've been digging the the Admin Guide vol1/2 and the NetBackup_Commands.pdf. From what I've read so far it looks like the bpbackup command can be used? What we are looking to do is to trigger a backup from a script after certain conditions are met. If anyone could share their experience and, or point me to any documentation that details the options I'd greatly appreciate it. Thanks in advance for your time.
1) you must create a policy in netbackup; this server must be a client of that policy; and the poilcy must have a USER Schedule. (more than one if you want two or more different retetions)
the User schedule can be set for 24x7 or for only a smaller window - if say you have a Monday window of 8 pm to 10 pm then the job from the client - if it tries to run be for 8 pm will dies, if it tries to run after 10 pm will die - if it tires to run at 9 pm it will work.
2) create your script and get all the correct stuff into it
as you say you are working on a condition - the script would start with what you want - do a verify check in the script that it is at the correct condition - then do your backup - for this you are going to want to do some special things if you have different retentions - in that case you want to check your "day" and then pick the correct user schedule to use. and redirect to a file if you want and email that when done maybe?
3) create your cronentry
(below example is aix)
#Set schedule for retention level in Netbackup
CURRDT=`date +%a`
CUDHR=$(date +"%H")
if [ $CUDHR -lt 17 -a $CURRDT = "Fri" ]
then
CURRDT="Thu"
fi
if [ "$CURRDT" = "Fri" ] || [ "$CURRDT" = "Sat" ] || [ "$CURRDT" = "Sun" ];then
VERSCHED=UserFull
else
VERSCHED=Userincr
fi
<installpath>/bpbackup -p <yourpolicyname> -s ${VERSCHEDL} -h $(hostname) - S <masterserver> -t <policytype#> -w ${BKUPDEV}
if [[ $? -ne 0 ]]
then
print "NetBackup backup of ${BKUPDEV} failed."
else
print "NetBackup Backup completed."
fi
change and test as needed for your environment.
EDIT: I missed the -w ${BKUPDEV}
that can be a variable you set up or just -w and the path you want to backup.