3.3.5 Snapshot Files

An Exascale snapshot is a thinly-provisioned read-only point-in-time copy of a file. The source file for a snapshot can be a regular file, a file clone, or another snapshot. Exascale uses redirect-on-write techniques to create and maintain snapshots very quickly and space-efficiently.

To snapshot a file or group of files, use the ESCLI snapshotfile command.

All snapshots created in the same operation are point-in-time consistent, and all files in a snapshot operation must be in the same vault.

  • To snapshot a single file, use the snapshotfile command and specify the source file and the snapshot destination. For example:
    @> snapshotfile @myvaultname/myfilename @myvaultname/mysnapshotfile

    In the previous example, the snapshot (@myvaultname/mysnapfile) is created in the same location as the original file (@myvaultname/myfilename). In the following example, the snapshot is created under @myvaultname/snapshots.

    @> snapshotfile @myvaultname/myfilename @myvaultname/snapshots/myothersnapshotfile
  • To snapshot a group of files, use the snapshotfile command and specify the source files and the snapshot destinations by including the wildcard character (*). For example:
    @> snapshotfile @myvaultname/myfiles* @myvaultname/mysnapshotfiles*

    In the previous example, the snapshots are created in the same location as the original files. In the following example, the snapshots are created in a different location.

    @> snapshotfile @myvaultname/myfiles* @myvaultname/moresnapshots/moresnapshotfiles*
  • To snapshot multiple files or groups of files, use the snapshotfile command and specify multiple source and destination pairs. For example:
    @> snapshotfile @myvaultname/file1 @myvaultname/file1snapshot @myvaultname/myfiles* @myvaultname/mysnapshotfiles*

    In the previous example, the snapshot operation processes an individual file (@myvaultname/file1) and a group of files (@myvaultname/myfiles*), and the snapshots (@myvaultname/file1snapshot and @myvaultname/mysnapshotfiles*) are created in the same location as the original files.

    In the following example, the snapshots are created in multiple different locations:

    @> snapshotfile @myvaultname/file1 @myvaultname/location1/file1snapshot @myvaultname/myfiles* @myvaultname/location2/mysnapshotfiles*

    When you specify multiple source and destination pairs, the source file specifications are considered in order, and only the first match is used.

    For example, the following command creates snapshots under @myvaultname/snap/a for files matching @myvaultname/a*, while the snapshots for the other files are created under @myvaultname/snap/other.

    @> snapshotfile @myvaultname/a* @myvaultname/snap/a/a* @myvaultname/* @myvaultname/snap/other/*

    However, the following command creates all of the snapshots under @myvaultname/snap/other because all of the files match @myvaultname/*. So, in this case, the second argument pair is never used.

    @> snapshotfile @myvaultname/* @myvaultname/snap/other/* @myvaultname/a* @myvaultname/snap/a/a*
  • To snapshot some files while excluding others, use the snapshotfile command with one of the following exclusion methods:
    • You can use the --exclude option to specify files that are excluded from the snapshot operation.

      For example, the following command snapshots files in @myvaultname, except for files matching @myvaultname/a* or @myvaultname/b*:

      @> snapshotfile @myvaultname/* @myvaultname/snap/* --exclude @myvaultname/a* --exclude @myvaultname/b*
    • If you specify a null (empty) string as a snapshot destination value, no snapshots are created for the corresponding source files. The null destination and corresponding source is considered in order along with all other source and destination pairs, and only the first match is used.

      For example, the following command also snapshots files in @myvaultname, except for those matching @myvaultname/a* or @myvaultname/b*.

      @> snapshotfile @myvaultname/a* "" @myvaultname/b* "" @myvaultname/* @myvaultname/snap/*

After creation, snapshots are generally managed using the same commands and procedures that are used for other files. For example, you can use the rmfile command to delete a snapshot.

Related Topics