cancel
Showing results for 
Search instead for 
Did you mean: 

Script to initiate backup

V_P_S
Level 4

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

1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6

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)

View solution in original post

6 REPLIES 6

Andy_Welburn
Level 6

Environment?

What sort of backups?

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

V_P_S
Level 4

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

mph999
Level 6
Employee Accredited

 

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

Andy_Welburn
Level 6

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)

V_P_S
Level 4

Thanks Andy..

rajeshthink
Level 4

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.