Data ONTAP provides a default snapshot schedule for each volume. You can configure the schedule to fit your needs. This schedule creates snapshots automatically and deletes old snapshots after a predetermined amount of time.
When you install Data ONTAP on a filer, it creates a default snapshot schedule. The default snapshot schedule automatically creates one nightly snapshot Monday through Saturday at midnight, and four hourly snapshots at 8 a.m., noon, 4 p.m., and 8 p.m. Data ONTAP retains the two most recent nightly snapshots and the six most recent hourly snapshots, and deletes the oldest nightly and hourly snapshots when new snapshots 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, the value of n is adjusted for all the weekly, nightly, or hourly snapshots. The higher the value of n, the older the snapshot.
To display the snapshot schedule for a volume on a filer, complete the following step.
| 1 |
snap sched [volume_name] Note |
The following is an example of the snap sched command output:
filerA>snap sched vol1
Volume vol1: 2 6 8@8,12,16,20
The following illustration explains the arguments in a sample snap sched command output.
This schedule keeps the two most recent weekly snapshots, the six most recent nightly snapshots, and the eight most recent hourly snapshots, created at 8 a.m., noon, 4 p.m., and 8 p.m. every day. Whenever the snapshot schedule creates a new snapshot of a particular type, it deletes the oldest one and renames the existing ones. On the hour, for example, the filer deletes hourly.7, renames hourly.0 to hourly.1, and so on.
Note
If you omit the @ argument specifying the hours for the hourly snapshots, Data ONTAP creates a snapshot every hour. Nightly and weekly snapshots are always created at midnight.
Following are some strategies for scheduling and retaining snapshots:
snap sched volume_name 0 2 6@8,12,16,20
Following is the recommended snapshot schedule for this situation. It keeps two weekly snapshots, six nightly snapshots, and eight hourly snapshots:
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 snapshots consumes 10% to 20% of disk space. Considering the benefits of snapshots, it is worthwhile to reserve this amount of disk space for snapshots. For more information on how snapshots 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 snapshots 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 snapshots 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 snapshots are created at midnight of each day except Sunday, and weekly snapshots are created at midnight on Sunday. Only one snapshot is created at a time. If a weekly snapshot is being created, for instance, no daily or hourly snapshot will be created even if one is scheduled.
You can disable automatic snapshots for a period of time without changing the automatic snapshot schedule.
To temporarily disable or enable automatic snapshots, complete the following step.
Note
You can also disable automatic snapshots by changing the snapshot schedule so that no snapshots are scheduled. To do this, enter the following command:
snap sched volume_name 0 0 0
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00476
File: snap5.htm
Last updated: 11/13/03 17:17:21