Setting Up File Snapshot

The File Snapshot feature enables your backup utility to keep an original copy of all data files. For example, when your system backs up or crashes at a time when you are modifying a file, the file backup could contain both old and new data. Snapshot captures the most recent closed copy of the file. This way, if you lose data between the backup cycles, you still have a solid copy of the previously saved file.

If you select File Snapshot on a volume, the backup utility copies all the meta-data (owner, created date/time, modifier, etc.). During write requests, only the data that is being written to is copied. NSS recognizes how to return the appropriate data when read requests come in for the real file or the Snapshot file.

Use the following NSS command at the server console to enable the File Snapshot for a volume:

nss /FileCopyOnWrite=<volName>

or

nss /FileCopyOnWrite=all

To disable File Snapshot, enter the following:

nss /NoFileCopyOnWrite=<volName>

or

nss /NoFileCopyOnWrite=all

After you set up File Snapshot on your volumes, you need to deactivate the volumes. Then you need to activate and mount the volumes again to ensure there are no open files without a snapshot.

To open a snapshot file for backup, you need to set a bit in the requested rights parameter in addition to READ_ACCESS_BIT. This bit is 0x04000000. It is defined in the NSS header files as zPR_READ_ACCESS_TO_SNAPSHOT. The default setting for File Snapshot is when your file system receives an open for write request, it will wait for the backup open to close the file. If you want to return an error, the backup open should also set the deny the write bit.

To get information on a snapshot file, use the getInfo command. Any getInfo call that returns packed information with the RNewStyle bit set in the info mask is supported. You need to set an additional bit 0x20000000 in the information mask. This bit is defined at RNSSInfoOnSnapshot in NSS header files. Both open and getinfo calls require the bit for requested rights and the bit for additional info mask.

The following are some additional calls that return information about File Snapshot:

You can also use ConsoleOne to select the File Snapshot feature. See Creating a Logical Volume .