Video Screencast Help

Script to initiate backup

Created: 14 Nov 2012 • Updated: 14 Nov 2012 | 6 comments
This issue has been solved. See solution.

Hello All,

I have to initiate round about 60 policies , is there any script to do that. If i initiate one by one then its very big headache and time consuming..

 

Please help

Comments 6 CommentsJump to latest comment

mph999's picture

 

Hope you are on unix/ linux.

This command will give a list of the policy followed by it's schedules

 

bppllist -allpolicies |awk '/CLASS |SCHED /{print $2}'
 
womble_slp_sp1_sp2
Full
womble_tmp
Full
diff
 
So in this example, both policies have Full schedules, and policy = womble_tmp also has a schedule called diff.

From this output you can create a script containing lines like this :

bpbackup -i -p <policy name> -s <schedule name>

Job done ...

Martin

 

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Andy Welburn's picture

Environment?

What sort of backups?

Why are you having to initiate manually & not use NetBackups scheduling?

V P S's picture

Actually server has been rebooted and lots of backups failed. I have to initiate them if i do one by one then its so time consuming. Is there any script that initiate all that in single click

Andy Welburn's picture

Easiest way I can think of would be through the GUI.

Under Policies/Summary of all Policies, highlight all the affected policies (in the top pane), right-click & select manual backup.

This will then come up with a pop-up:

"Do you want to begin backups for all clients in the selected policies? Selecting No will allow client and schedule selections for each policy?"

Select "NO" & you will be prompted to select, for each highlighted policy in turn, which schedules & which clients you want to run the manual backup for.

 

***EDIT***

Or possibly even easier, if they're still there, highlight the failed jobs in the Activity Monitor, right-click & restart (not 100% sure if this would be dependant upon their backup windows still being open or not)

SOLUTION
rajeshthink's picture

simple script , i think i had thought you or givin you. (Hope you have full backup on Weekend)

creat a file client.txt ..and put all your policy in there

next cat > Policy

do /usr/openv/netbackup/bin

echo " Policy = $line"

sudo ./bpbackup -i -p $line -s < your sechdule>

done <client.txt

 

make sure you have Policy give permission of 776 /777 using chmod 776 Policy.