snap create | delete vol_name name
snap rename vol_name from to
snap sched [ vol_name [ weeks [ days [ hours[@list] ] ] ] ]
snap reserve [ vol_name [ percent ] ]
A snapshot is a read-only copy of the entire file system as of the time the snapshot was created. The filer uses a copy-on-write technique to create snapshots very quickly without consuming any disk space. Only as blocks in the active file system are modified and written to new locations on disk does the snapshot begin to consume extra space.
Snapshots are exported to all CIFS or NFS clients. They can be accessed from each directory in the file system. From any directory, a user can access the set of snapshots from a hidden sub-directory that appears to a CIFS client as ~snapsht and to an NFS client as .snapshot. These hidden sub-directories are special in that they can be accessed from every directory, but they only show up in directory listings at an NFS mount point or at the root of CIFS share.
Each volume on the filer can have up to 20 snapshots at one time. Because of the copy-on-write technique used to update disk blocks, deleting a snapshot will generally not free as much space as its size would seem to indicate. Blocks in the snapshot may be referenced by other snapshots, or by the active file system, and thus may be unavailable for reuse even after the snapshot is deleted.
The snap commands are persistent across reboots. Do not include snap commands in the /etc/rc. If you include a snap command in the /etc/rc file, the same snap command you enter through the command line interface does not persist across a reboot and is overridden by the one in the /etc/rc file.
Automatic snapshots
Automatic snapshots can be scheduled to occur weekly, daily, or hourly. Weekly snapshots are named weekly.N, where N is "0" for the most recent snapshot, "1" for the next most recent, and so on. Daily snapshots are named daily.N and hourly snapshots hourly.N. Whenever a new snapshot of a particular type is created and the number of existing snapshots of that type exceeds the limit specified by the sched option described below, then the oldest snapshot is deleted and the existing ones are renamed. If, for example, you specified that a maximum of 8 hourly snapshots were to be saved using the sched command, then on the hour, hourly.7 would be deleted, hourly.0 would be renamed to hourly.1, and so on.
snap list [ vol_name ]
displays a single line of information for each snapshot. Along
with the snapshot's name, it shows when the snapshot was
created and the size of the snapshot. If you include the
vol_name argument, list displays snapshot information only for
the specified volume. With no arguments, it displays snapshot
information for all volumes in the system. The following is an
example of the snap list output on a filer with two volumes
named engineering and marketing.
Volume engineering
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Nov 14 08:00 hourly.0
50% (50%) 0% ( 0%) Nov 14 00:00 nightly.0
67% (50%) 0% ( 0%) Nov 13 20:00 hourly.1
75% (50%) 0% ( 0%) Nov 13 16:00 hourly.2
80% (50%) 0% ( 0%) Nov 13 12:00 hourly.3
83% (50%) 1% ( 0%) Nov 13 08:00 hourly.4
86% (50%) 1% ( 0%) Nov 13 00:00 nightly.1
87% (50%) 1% ( 0%) Nov 12 20:00 hourly.5
Volume marketing
%/used %/total date name
---------- ---------- ------------ --------
0% ( 0%) 0% ( 0%) Nov 14 08:00 hourly.0
17% (16%) 0% ( 0%) Nov 14 00:00 nightly.0
28% (16%) 0% ( 0%) Nov 13 20:00 hourly.1
37% (16%) 0% ( 0%) Nov 13 16:00 hourly.2
44% (16%) 0% ( 0%) Nov 13 12:00 hourly.3
49% (16%) 1% ( 0%) Nov 13 08:00 hourly.4
54% (16%) 1% ( 0%) Nov 13 00:00 nightly.1
58% (16%) 1% ( 0%) Nov 12 20:00 hourly.5
snap delete vol_name name
deletes the existing snapshot belonging to volume vol_name that
has the specified name.
snap rename vol_name oldname newname
gives an existing snapshot a new name. You can use the snap
rename command to move a snapshot out of the way so that it
won't be deleted automatically.
snap sched [ vol_name [ weeks [ days [ hours [ @list ] ] ] ] ] sets the schedule for automatic snapshot creation. The argument vol_name identifies the volume the schedule should be applied to. The second argument indicates how many weekly snapshots should be kept on-line, the third how many daily, and the fourth how many hourly. If an argument is left off, or set to zero, then no snapshot of the corresponding type is created. Daily snapshots are created at 24:00 of each day except Sunday, and weekly snapshots are created at 24:00 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 would otherwise be scheduled. For example, the command
snap sched vol0 2 6
indicates that two weekly snapshots and six daily snapshots of volume vol0 should be kept on line. No hourly snapshots will be created. For snapshots created on the hour, an optional list of times can be included, indicating the hours on which snapshots should occur. For example the command
snap sched vol0 2 6 8@8,12,16,20
indicates that in addition to the weekly and daily snapshots, eight hourly snapshots should be kept on line, and that they should be created at 8 am, 12 am, 4 pm, and 8 pm. Hours must be specified in 24-hour notation.
With no argument, snap sched prints the current snapshot schedule for all volumes in the system. With just the vol_name argument, it prints the schedule for the specified volume.
snap reserve [ vol_name ] | [ vol_name percent ] Sets the size of the indicated volume's snapshot reserve to percent. With no percent argument, prints the percentage of disk space that is reserved for snapshots in the indicated volume. With no argument, the snap reserve command prints the percentage of disk space reserved for snapshots for each of the volumes in the system. Reserve space can be used only by snapshots and not by the active file system.
The snap create, snap delete, and snap list commands can take 20 or 30 seconds on very large file systems.