ONTAP Discussions

How does snapvault schedule work?

PASCAL_PETIT
6,606 Views

Hello community,

does someone can clarify some points about snapvault schedules?

On my primary  I have to schedule 2 snapvaults per day with 14 days retention and on the secondary another policy ( one snapvault per day keep 35 days, one weekly keep 4 weeks and one monthly keep 12 monthes).

About my understanding, the secondary via -x option in schedule contact the primary to use the snapshot with the same name, so datas snapvaulted are uptodate from primary.

So how to schedule snapvault on secondary with a different policy from primary to allways get snapvault updated from primary?

and when a monthly snapvault is requiered, which snapshot will be used?

Thank you for your help.

Pascal

9 REPLIES 9

brauntisc
6,606 Views

Hi Pascal

Following a short example with daily and weekly... The snapvault job on the secondary starts 5min after your Scheduling, because after 5min the snapshot on the primary is definitely created and the secondary

can now transfer this snapshot...

Primary Storage

snapvault snap sched  snap_daily 2@mon-sat@20

snapvault snap sched vol1  snap_weekly 2@sun@20

snapvault snap sched

create  snap_daily 2@mon-sat@14

create  snap_weekly 2@sun@20

Secondary Storage

snapvault snap sched -x vol1_SV snap_daily 30@mon-sat@20

snapvault snap sched -x vol1_SV snap_weekly 5@sun@20

snapvault snap sched

xfer   vol1_SV snap_daily 30@mon-sat@14 preserve=default,warn=0

xfer   vol1_SV snap_weekly 5@sun@20 preserve=default,warn=0

regards

Thomas

PASCAL_PETIT
6,606 Views

Hi Thomas,

And what's up if you don't have snap_weekly on primary but only on secondary?

Primary Storage

snapvault snap sched  snap_daily 2@mon-sat@20

snapvault snap sched

create  snap_daily 2@mon-sat@14

Secondary Storage

snapvault snap sched -x vol1_SV snap_daily 30@mon-sat@20

snapvault snap sched -x vol1_SV snap_weekly 5@sun@20

snapvault snap sched

xfer   vol1_SV snap_daily 30@mon-sat@14 preserve=default,warn=0

xfer   vol1_SV snap_weekly 5@sun@20 preserve=default,warn=0

aborzenkov
6,606 Views

Then transfer will fail. You can only transfer snapshots that already exist on primary. Secondary won’t create any snapshots itself.

aborzenkov
6,606 Views

So how to schedule snapvault on secondary with a different policy from primary to allways get snapvault updated from primary?

You can schedule snapshots on secondary independently from primary. And you can schedule transfer-only without creating snapshots on secondary (count = 0 in schedule). Finally you can use manual "snapvault update" and "snapvault snap create" and schedule them outside of NetApp (hint - Protection Manager ... ).

and when a monthly snapvault is requiered, which snapshot will be used?

I am not sure I understand the question. When monthly snapshot is required for what? For restore? Then it is up to you which snapshot to use.

PASCAL_PETIT
6,606 Views

Hi, thank you for the feedback,

About monthly snapvault, my question is how to schedule a monthly snapvault on secondary, without monthly on primary (data in monthly snapvault have to be up to date)?

aborzenkov
6,606 Views

You will need to schedule it outside of Data ONTAP.

https://communities.netapp.com/thread/17188?tstart=0

PASCAL_PETIT
6,606 Views

Ok but for exemple If I schedule at 7 PM from the AIX crontable the command snapvault snap create <volume> sv_monthly to be run on the secondary

Does the monthly snapvault will contain datas stored at 7 PM on primary?

aborzenkov
6,606 Views

It will contain data from the latest SnapVault secondary update. You can run “snapvault update” before “snapvault snap create”.

GUTLESBACHER
6,606 Views

If you want to include an update you can either do the update manually yourself, or you can simply use the -x option for the schedule and then at the snap create command it will use this option. This will do an automatic update before it takes the snap and if an update is ongoing when you start the command, it will wait for the update to finish before taking the snap.

snapvault snap create [ -w ] volname snapname

Available on the primary and secondary. Initiates creation of the previously configured snapshot snapname in volume volname just as if its scheduled time for creation had arrived. Old snapshots are deleted,  existing ones are renamed,  and a new one is created. On the secondary,  if the -x option was given to the snapvault snap sched command when the snapshot schedule was configured,  then update transfers from the primaries for all the qtrees in the volume will start just as they would when the scheduled time arrives. If another SnapVault snapshot is actively being created in the same volume, activity on this snapshot will be queued until work on the other snapshot completes.

Public