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.
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.
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.
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.
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.
To display the Snapshot schedule for a volume, complete the following step.
| 1 |
snap sched [volume_name] Note |
The following is an example of the snap sched command output:
systemA>snap sched vol1
Volume vol1: 2 6 8@8,12,16,20
To display the Snapshot schedule for a volume using FilerView, complete the following steps.
| 1 | |
| 2 | |
| 3 |
The following illustration explains the arguments in a sample snap sched command output.
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.
Following are some strategies for scheduling and retaining Snapshot copies:
snap sched volume_name 0 2 6@8,12,16,20
Following is the recommended Snapshot schedule for this situation. It keeps two weekly Snapshot copies, six nightly Snapshot copies, and eight hourly Snapshot copies:
snap sched vol1 2 6 8@8,12,16,20
On many systems, only 5% or 10% of the data changes each week, so the Snapshot schedule of six nightly and two weekly Snapshot copies consumes 10% to 20% of disk space. Considering the benefits of Snapshot copies, it is worthwhile to reserve this amount of disk space for Snapshot copies. For more information on how Snapshot copies consume disk space, see Understanding Snapshot disk consumption.
snap sched vol2 0 0 3
This schedule does not consume much disk space, and it lets users recover files in recent Snapshot copies as long as they notice their mistake within a couple of hours.
To change the automatic Snapshot schedule for a specific volume, complete the following step.
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.
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.
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
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01081_B0
File: snap5.htm
Last updated: 01-Dec-2005 16:35:59