Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Creating Snapshot schedules

About creating Snapshot schedules  Top

Data ONTAP provides a default Snapshot schedule for each volume. You can configure the schedule to fit your needs. This schedule creates Snapshot copies automatically and deletes old Snapshot copies after a predetermined amount of time.

The default Snapshot schedule  Top

When you install Data ONTAP on a storage system, it creates a default Snapshot schedule. The default Snapshot schedule automatically creates one nightly Snapshot copy Monday through Saturday at midnight, and four hourly Snapshot copies at 8 a.m., noon, 4 p.m., and 8 p.m. Data ONTAP retains the two most recent nightly Snapshot copies and the six most recent hourly Snapshot copies, and deletes the oldest nightly and hourly Snapshot copies when new Snapshot copies are created. You can see an example of the output for the default schedule in Default snap schedule command results.

User-specified Snapshot schedules  Top

There are three types of schedules that you can set up to run automatically using the snap sched command. The following table describes the three types.

Type

Description

Weekly

Data ONTAP creates these Snapshot copies every Sunday at midnight.

Weekly Snapshot copies are called weekly.n, where n is an integer. The most recent weekly Snapshot copy is weekly.0, and weekly.1 is the next most recent weekly Snapshot copy.

Nightly

Data ONTAP creates these Snapshot copies every night at midnight, except when a weekly Snapshot copy is scheduled to occur at the same time.

Nightly Snapshot copies are called nightly.n, where n is an integer. The most recent nightly Snapshot copy is nightly.0, and nightly.1 is the next most recent nightly Snapshot copy.

Hourly

Data ONTAP creates these Snapshot copies on the hour or at specified hours, except at midnight if a nightly or weekly Snapshot copy is scheduled to occur at the same time.

Hourly Snapshot copies are called hourly.n, where n is an integer. The most recent hourly Snapshot copy is hourly.0, and hourly.1 is the next most recent hourly Snapshot copy.

Note
When Data ONTAP creates a weekly, nightly, or hourly Snapshot copy, the value of n is adjusted for all the weekly, nightly, or hourly Snapshot copies. The higher the value of n, the older the Snapshot copy.

Snapshot schedule conflicts  Top

If either the SnapMirror or SnapVault features are scheduled to perform Snapshot management at the same time as a snap sched activity, then the Snapshot management operations scheduled using the snap sched command might fail with syslog messages, "Skipping creation of hourly snapshot," and "Snapshot already exists."

To avoid this condition, stagger your Snapshot update schedules so that SnapMirror activity does not begin or end at the exact minute a snap sched operation attempts to create a Snapshot copy. Additionally, if snap sched Snapshot copies conflict with SnapVault activity, use the snapvault snap sched command to configure equivalent schedules.

Displaying the Snapshot schedule at the command line  Top

To display the Snapshot schedule for a volume, complete the following step.

Step

Action

1

Enter the following command:

snap sched [volume_name] 

Note
If you do not specify a volume name, snap sched displays the Snapshot schedule for each volume on the storage system.

Example

The following is an example of the snap sched command output:

systemA>snap sched vol1
Volume vol1: 2 6 8@8,12,16,20

Displaying the Snapshot schedule using FilerView  Top

To display the Snapshot schedule for a volume using FilerView, complete the following steps.

Step

Action

1

In FilerView, click Volumes in the list on the left.

2

In the list under Volumes, click Snapshots.

3

In the list under Snapshots, click Configure.

What the snap sched command arguments mean  Top

The following illustration explains the arguments in a sample snap sched command output.

Snapshot schedule results

This schedule keeps the two most recent weekly Snapshot copies, the six most recent nightly Snapshot copies, and the eight most recent hourly Snapshot copies, created at 8 a.m., noon, 4 p.m., and 8 p.m. every day. Whenever the Snapshot schedule creates a new Snapshot copy of a particular type, it deletes the oldest one and renames the existing ones. On the hour, for example, the system deletes hourly.7, renames hourly.0 to hourly.1, and so on.

Note
If you omit the @ argument specifying the hours for the hourly Snapshot copies, Data ONTAP creates a Snapshot copy every hour. Nightly and weekly Snapshot copies are always created at midnight.

Strategies for creating a Snapshot schedule  Top

Following are some strategies for scheduling and retaining Snapshot copies:

Changing the Snapshot schedule  Top

To change the automatic Snapshot schedule for a specific volume, complete the following step.

Step

Action

1

Enter the following command:

snap sched volume_name weekly nightly hourly@n,n,....

volume_name is the name of the specific volume for the Snapshot copy.

weekly is the number of weekly Snapshot copies to keep.

nightly is the number of nightly Snapshot copies to keep.

hourly is the number of hourly Snapshot copies to keep.

n,n,... specifies the hours at which to create the hourly Snapshot copies.

Note
A zero in any of the three schedules (weekly, nightly, hourly) disables Snapshot copies for that interval.

Default snap schedule command results  Top

This is the default automatic Snapshot schedule:

snap sched volx 0 2 6 @8,12,16,20

The following example lists the Snapshot copies created using the default schedule (where January 11 is a Sunday):


 
ls -lu .snapshot 
total 64
drwxrwsrwx  1 root 4096 Jan 14 12:00 hourly.0
drwxrwsrwx  1 root 4096 Jan 14 08:00 hourly.1
drwxrwsrwx  1 root 4096 Jan 13 20:00 hourly.2
drwxrwsrwx  1 root 4096 Jan 13 16:00 hourly.3
drwxrwsrwx  1 root 4096 Jan 13 12:00 hourly.4
drwxrwsrwx  1 root 4096 Jan 13 08:00 hourly.5
drwxrwsrwx  1 root 4096 Jan 14 00:00 nightly.0
drwxrwsrwx  1 root 4096 Jan 13 00:00 nightly.1

Note
Daily Snapshot copies are created at midnight of each day except Sunday, and weekly Snapshot copies are created at midnight on Sunday. Only one Snapshot copy is created at a time. If a weekly Snapshot copy is being created, for instance, no daily or hourly Snapshot copy will be created even if one is scheduled.

Disabling and enabling automatic Snapshot copies  Top

You can disable automatic Snapshot copies for a period of time without changing the automatic Snapshot schedule.

To temporarily disable or enable automatic Snapshot copies, complete the following step.

Step

Action

1

If you want to...

Then...

Disable automatic Snapshot copies

Enter the following command:

vol options volume_name 
nosnap on

volume_name is the name of the volume for which you want to disable automatic Snapshot copies.

Enable automatic Snapshot copies

Enter the following command:

vol options volume_name 
nosnap off

volume_name is the name of the volume for which you want to enable automatic Snapshot copies.

Note
You can also disable automatic Snapshot copies by changing the Snapshot schedule so that no Snapshot copies are scheduled. To do this, enter the following command:

snap sched volume_name 0 0 0

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments