A Snapshot copy is a copy of a FlexVol volume that represents the volume's contents at a particular point in time. You can view the contents of the Snapshot copy and use the Snapshot copy to restore data that you lost recently.
A Snapshot copy of a volume is located on the parent volume but has read-only access. It represents the contents of the original volume at a particular point in time. A parent volume and a Snapshot copy of it share disk space for all blocks that have not been modified between the creation of the volume and the time the Snapshot copy is made, thereby making Snapshot copies lightweight.
Similarly, two Snapshot copies share disk space for those blocks that were not modified between the times that the two Snapshot copies were created. You can create a chain of Snapshot copies to represent the state of a volume at a number of points in time. Users can access Snapshot copies online, enabling users to retrieve their own data from past copies, rather than asking a system administrator to restore data from tape. Administrators can restore the contents of a volume from a Snapshot copy.
$ ls .snapshot daily.2006-05-14_0013/ hourly.2006-05-15_1306/ daily.2006-05-15_0012/ hourly.2006-05-15_1406/ hourly.2006-05-15_1006/ hourly.2006-05-15_1506/ hourly.2006-05-15_1106/ weekly.2006-05-14_0019/ hourly.2006-05-15_1206/Each subdirectory of the .snapshot directory includes a list of the parent volume's files and directories. If users accidentally delete or overwrite a file, they can locate it in the most recent Snapshot directory and restore it to their main read-write volume simply by copying it back to the main directory. The following example shows how an NFS user can locate and retrieve a file named my.txt from the .snapshot directory:
$ ls my.txt ls: my.txt: No such file or directory $ ls .snapshot daily.2006-05-14_0013/ hourly.2006-05-15_1306/ daily.2006-05-15_0012/ hourly.2006-05-15_1406/ hourly.2006-05-15_1006/ hourly.2006-05-15_1506/ hourly.2006-05-15_1106/ weekly.2006-05-14_0019/ hourly.2006-05-15_1206/ $ ls .snapshot/hourly.2006-05-15_1506/my.txt my.txt $ cp .snapshot/hourly.2006-05-15_1506/my.txt . $ ls my.txt my.txtThe .snapshot directory is always visible to NFSv2 and NFSv3 clients and available from within the volume, and not visible but still available from any other volume. For NFSv4 clients, the .snapshot directory is not visible, but accessible in all paths of a volume.