ONTAP Discussions

Can a schedule in the snapshot policy be associated with two different prefix names?

heightsnj

I am using the command following to create snapshot policy:

>volume snapshot policy create -policy snapshot_app1 -enabled true -schedule1 daily2030  -count1 15 -prefix1 snapshot_app1_15days_daily

 

If I wanted to use the the same schedule "daily2030", and use different prefix name, say prefix2, it won't allow me to do that. Is there anyway i can use the same schedule but with different prefix name?

 

4 REPLIES 4

hmoubara

Hello @heightsnj 

 

A snapshot policy can not contain same schedule with different prefix. You will have to create a separate policy and add the original schedule desire and specify the new prefix. Per example:

 

cluster::> snapshot policy add-schedule -policy >policy name< -schedule daily2030  -prefix <>

 

How to create a snapshot policy:

https://docs.netapp.com/us-en/ontap/data-protection/create-snapshot-policy-task.html

 

How to create a Snapshot Cron Schedule:

https://docs.netapp.com/us-en/ontap/data-protection/create-snapshot-job-schedule-task.html

 

Thanks 
 

heightsnj

1.     After several tests, it looks to me that the same schedule can only be used in a policy and not in different policies. That sounds weird to me as for what logical reasons behind that. In some cases, what if I wanted to use the same schedule for different policy? why cannot be allowed?  That  was my original question. 

 

2.     As different than what @hmoubara said, " snapshot policy add-schedule " only can be used if I use a different schedule into the same policy. So, the command as suggested below was incorrect:
cluster::> snapshot policy add-schedule -policy >policy name< -schedule daily2030  -prefix <>

Hello @heightsnj 

 

Doing further checking you are right,  Every schedule has only one prefix. Once a prefix gets associated with a schedule, you cannot update the prefix. If some prefix is already associated with the schedule and you do not specify this parameter, then the previously defined prefix is used.

 

Thanks

tahmad
Public