Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Backup and Recovery Community Blog

NetBackup de-activate specific policies during business hours

Created: 20 Mar 2009 • Updated: 20 Mar 2009
Stumpr2's picture
+4 4 Votes
Login to vote

Let's face it. Sometimes backups fail. Your job, if you chose to accept it, is to troubleshoot and retry the backup. When you have hundreds of policies it is hard to determine which backups are forbidden to run during business hours. It's only a matter of time before you errantly submit a manual backup of a client that is NOT supposed to be backed up during business hours.

The trick is that you need to keep Netbackup running as normal, but you do not want specific policies to run. This is what I do to keep certain backup jobs from being submitted during business hours.

 

# crontab -l

0 6 * * 1-5 /usr/local/scripts/policy-deactivate.sh

0 17 * * 1-5 /usr/local/scripts/policy-activate.sh

 

# cat /usr/local/scripts/policy-deactivate.sh

#! /bin/sh

for i in `/usr/bin/cat /usr/local/scripts/policylist`

do

/usr/bin/echo $i

/usr/openv/netbackup/bin/admincmd/bpplinfo $i -modify -inactive

done



# cat /usr/local/scripts/policy-activate.sh

#! /bin/sh

for i in `/usr/bin/cat /usr/local/scripts/policylist`

do

/usr/bin/echo $i

/usr/openv/netbackup/bin/admincmd/bpplinfo $i -modify -active

done



# cat /usr/local/scripts/policylist

Prod_Messaging_Clus1

Prod_Messaging_Clus2

Prod_Messaging_Clus3

Prod_Messaging_Clus4

Prod_connect_BCV