cancel
Showing results for 
Search instead for 
Did you mean: 

Command or script to list schedule window of rman policies

Varma_Chiluvuri
Level 5
Certified

Can anyone give me command or script in unix to display only the schedule window of policies in unix

2 ACCEPTED SOLUTIONS

Accepted Solutions

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified
Bppllist will show you the schedule of the selected policy.

View solution in original post

Andy_Welburn
Level 6

Just use (e)grep to strip out what you need.

e.g.

bppllist -U -allpolicies | egrep "Policy Name|Schedule|day" | egrep -v "Frequency|Retention"

 

View solution in original post

7 REPLIES 7

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified
Bppllist will show you the schedule of the selected policy.

Varma_Chiluvuri
Level 5
Certified

Riaan 

I have more than four hundred policies, do you have any command or script which gives only scheduled window, I have the list of policies and schedules in excel.

Andy_Welburn
Level 6

Just use (e)grep to strip out what you need.

e.g.

bppllist -U -allpolicies | egrep "Policy Name|Schedule|day" | egrep -v "Frequency|Retention"

 

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified

bppllist -U -allpolicies | egrep 'Policy Name:|Schedule:|  Type:|Calendar sched:|Last|First|Every|Frequency:|Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday'|grep -v 'Data Mover'

Will_Restore
Level 6

 

>>Can anyone give me command or script in unix to display only the schedule window of policies in unix


 

bpplsched  POLICYNAME  -U  |  egrep "Schedule: |Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday "

 

Gives you all you need and nothing more smiley

 

 

Will_Restore
Level 6

and using that command in a script ...
 

for POLICY in $(bppllist)

  do echo Policy:  $POLICY

  bpplsched  $POLICY  -U  |  egrep "Schedule: |Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday "

  echo

done

 

shows Policy Name, Schedule Name, and related backup Windows

 

Yasuhisa_Ishika
Level 6
Partner Accredited Certified

You can get schedules and its window by parsing CLASS, SCHED and SCHEDWIN lines from "bppllist -allpolicies -l". Please check Commands Reference Guide for more detail. SCHED and SCHEDWIN are detailed in bpplsched. Output format of schedule part in "bppllist -l" is same with bpplsched.