Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Accessing Snapshot copies from clients

About user access to Snapshot copies  Top

By default, every volume contains a directory named .snapshot, through which users can access old versions of files in that directory. How users gain access to Snapshot copies depends on the file-sharing protocol used--NFS or CIFS--and is described in the following sections. Access to Snapshot copies can be turned off.

Snapshot files carry the same permissions as the original file. A user who has permission to read a file in the volume can read that file in a Snapshot copy. A user without read permission to the volume cannot read that file in a Snapshot copy. Write permission does not apply because Snapshot copies are read-only. Snapshot copies can be accessed by any user with the appropriate permissions.

NFS user access to Snapshot copies  Top

The following illustration shows the directory structure on an NFS client with the vol0 volume named toaster mounted on the /n/toaster directory.

Explanation

In this example, the user can obtain access to Snapshot copies by way of the /n/toaster/.snapshot directory. Notice that the .snapshot directory is shown only at the mount point, although it actually exists in every directory in the tree. The user, however, can only see the .snapshot directory at the mount point. That is, the .snapshot directory is accessible by name in each directory, but is only seen in the output of the ls command at the mount point.

For example, at the mount point of a file system, a directory listing looks like this:

systemA> ls -a
.     ..     .snapshot     dir1     dir2

The same command entered in a directory below the mount point does not show the .snapshot directory; for example:

systemA> cd dir1
systemA> ls -a
.     ..    file1     file2

If you enter the ls command with the directory name .snapshot, you can see a directory for each of the Snapshot copies for the dir1 directory:

systemA> ls .snapshot
hourly.0     hourly.4     nightly.0     nightly.4
hourly.1     hourly.5     nightly.1     nightly.5
hourly.2     hourly.6     nightly.2     weekly.0
hourly.3     hourly.7     nightly.3     weekly.1

If the .snapshot directory entry appeared in every directory, it would cause many commands to work improperly. For instance, all recursive commands for deleting files would fail because everything below the .snapshot directory is read-only. Recursive copies would copy everything in the Snapshot copies as well as files in the active file system, and a find command would generate a list much longer than expected.

CIFS user access to Snapshot copies  Top

By default, CIFS users cannot see the .snapshot directory. Use the cifs.show_snapshot option to see the .snapshot directory. See the na_options(1) manual (man) page for details.

To CIFS users, the .snapshot directory appears only at the root of a share. For example, if a user's home directory is a share named bill that corresponds to the /vol/vol0/home/bill directory, only the /vol/vol0/home/bill/.snapshot directory is visible. When this user displays the contents of the home directory, the .snapshot directory is displayed as ~snapshot if the operating system supports long file names and as ~SNAPSHT if the operating system supports only short file names.

Note
The .snapshot directory can be made visible in a directory listing or Windows Explorer display if the client operating system is configured to show hidden files.

In each directory within the share, a snapshot directory exists but is not visible to clients. For example, if the client operating system supports long file names, the applications on that operating system can use the Snapshot copy at each level of the share by using .snapshot, ~snapshot, or ~SNAPSHT as the directory name. The user cannot, however, display the directory name in any listing.

Accessing Snapshot copies from CIFS clients  Top

To access Snapshot copies on Windows NT 4 or other Windows clients (Windows 95 or later), complete the following step.

Step

Action

1

From the Start > Run menu, enter the following command:

\\systemname\share\.snapshot (or ~snapshot or ~SNAPSHT).

systemname is the name of the storage system you are using.

share is the name of the share you want to access.

Example:

\\systemA\home\.snapshot

Snapshot copies can also be accessed lower in the share by providing a path to a lower directory. Snapshot copies can be accessed through DOS on any system by changing to the ~SNAPSHT directory.

Disabling and enabling client access to Snapshot copies  Top

Sometimes you might want to disable and enable client access to Snapshot copies in a specific volume, for example, for security reasons or to prevent access to corrupted or virus-infected files.

To disable or enable client access to Snapshot copies in a volume, complete the following step.

Step

Action

If you want to...

Then...

1

Disable client access to snap-shots and make the .snapshot directory invisible to clients

Enter the following command:

vol options volume_name 
nosnapdir on

volume_name is the name of the volume for which you want to disable client Snapshot copy access.

 

Enable client access to Snapshot copies and make the .snapshot directory visible to clients

Enter the following command:

vol options volume_name 
nosnapdir off

volume_name is the name of the volume for which you want to enable client Snapshot copy access.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments