cancel
Showing results for 
Search instead for 
Did you mean: 

How to deactivate and activate the backup policy using scheduler

Stiva
Level 4

Hi All,

Master server : Windows 2003

Policy Type : Oracle Database

I have a one request to deactivate the policy for specific time. Is there any way to deactivate it for two days using scheduler.

I use to deactivate the policy and activate manually again after specific time. but sometimes we forget to activate it. So looking for automatic process.

Please help me if we have any solution.

Thank You In Advance...smiley

1 ACCEPTED SOLUTION

Accepted Solutions

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

you need to use the Script with the below commands

bpplinfo policy_name -inactive

bpplinfo policy_name -active

let me know if you are looking for script too.

 

View solution in original post

5 REPLIES 5

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

you need to use the Script with the below commands

bpplinfo policy_name -inactive

bpplinfo policy_name -active

let me know if you are looking for script too.

 

SymTerry
Level 6
Employee Accredited

Policy activation/ deactivation is a manual process. ideally you would schedule to run around these events. but if the are not static times and dates then you would have to activate and deactivate them.

My suggestion is you could try using bpplinfo <policyname> -modify -inactive or -active in the OS scheduler. If in windows, use the task scheduler, for Linux use a cron.

NBU_nbu
Level 4

You can let the backup start according to user defined time (triggering off by ORACLE end through RMAN) since it is Windows ,it can be done in task scheduler.

Try to use calander based Schedule so that you can schedule which day to you want backup to start and should not start.

or else you can simply deactivate the policy in the GUI in order to prevent them to run.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
What is the reason for needing to deactivate the policy? Some kind of maintenance on the machine making it unavailable? If that is the case, you may want to use the NBU Client offline utility. In Host Properties, Master server, Client Attributes, you can add/select the Client name and specify offline and when to online again. No backups will be submitted for the Client during this period.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

One more thing - the bpplinfo command in Nagalla's post has another optional field - effective time: 
-ef effective_time

Unfortunately the Commands manual does not say in which format the date/time must be specified. My guess is that it may be the 10-digit UNC format. 
(I use this calculator: http://soft.zoneo.net/Unixtime/index.php )

So, if you use the command in Nagalla's post to deactivate the policy, and then add 'effective_time' with activate command, e.g. 
bpplinfo policy_name -active -ef 1404691200 
(which is next Monday 7 July 12:00am)
You can check policy info with this command to verify effective date/time:

bpplinfo policy_name -L