You might need to access a particular Snapshot copy (a version of a file at a particular point in time) because a file was changed, corrupted, or erased and the problem was not noticed until after one or more Snapshot copies of it were created. When you start looking for the version of the file you need, you will look for it by means of the access time of the Snapshot copy.
The version of a file refers to the last time the file was modified before a Snapshot copy was created. The access time of a file refers to the Snapshot copy creation time for a file, whether or not any modifications were made to that file.
The best way to find all versions of a particular file preserved in Snapshot copies is to use the ls command from an NFS client, or to use the Find function in Windows.
To find all the versions of a particular file in the Snapshot copies, complete the following step.
| 1 | ||
ls -l filename .snapshot/*/file_name Result | ||
ResultA search window opens prompting you for a directory and file name. | ||
The following example shows how to find all versions of the myfile.txt file:
ls -l myfile.txt .snapshot/*/myfile.txt
-rw-r--r-- 1 smith 0 Jan 14 09:40 myfile.txt
-rw-r--r-- 1 smith 0 Jan 13 18:39 .snapshot/nightly.0/myfile.txt
-rw-r--r-- 1 smith 0 Jan 12 19:17 .snapshot/nightly.1/myfile.txt
The version of myfile.txt in the active file system was last modified on January 14, but the old versions available in the Snapshot copies were modified on January 13 and January 12. Although users can use standard UNIX commands to read the saved versions of myfile.txt, they cannot modify or delete these older versions because everything in the .snapshot directory is read-only.
If a user maps the home share to drive F: and wants to find all versions of myfile.txt in Snapshot copies, the user can choose Find from the Windows Start menu to search for myfile.txt in the f:\~snapshot folder.
When Data ONTAP creates a Snapshot copy, the access time of each file in the Snapshot copy is updated to the Snapshot copy creation time.
To determine when Snapshot copies were created, complete the following step.
| 1 |
From an NFS client, enter the following command: ls -lu filename .snapshot/*/file_name |
Following is an example of the ls -lu command:
ls -lu myfile.txt .snapshot/*/myfile.txt
-rw-r--r-- 1 smith 0 Jan 14 09:40 myfile.txt
-rw-r--r-- 1 smith 0 Jan 14 00:00 .snapshot/nightly.0/myfile.txt
-rw-r--r-- 1 smith 0 Jan 13 00:00 .snapshot/nightly.1/myfile.txt
Note
On a UNIX client, if you use ls -l instead of ls -lu to list the Snapshot copy creation times, the times are not necessarily all different. The times listed by ls -l reflect the modification times of the directory at the time of each Snapshot copy, and are not related to the times at which the Snapshot copies are created.
You can determine the access time of a file from a CIFS client by checking its properties.
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01081_B0
File: snap7.htm
Last updated: 01-Dec-2005 16:35:59