Table of ContentsView in Frames

Restoring a single LUN

You can use SnapRestore to restore a single LUN without restoring the volume that contains it.


  1. Notify users that you are going to restore a LUN so that they know that the current data in the LUN will be replaced by that of the selected Snapshot copy.
  2. Enter the following command: snap restore [-f] [-t file] [-s snapshot_name] [-r restore_as_path] path_and_LUN_name

    -f suppresses the warning message and the prompt for confirmation.

    -t file specifies that you are entering the name of a file to revert.

    -s snapshot_name specifies the name of the Snapshot copy from which to restore the data.

    -r restore_as_path restores the file to a location in the volume different from the location in the Snapshot copy. For example, if you specify /vol/vol0/vol3/mylun as the argument to -r, SnapRestore restores the file called mylun to the location /vol/vol0/vol3 instead of to the path structure indicated by the path in path_and_lun_name.

    path_and_LUN_name is the complete path to the name of the LUN to be restored. You can enter only one path name.

    A LUN can be restored only to the volume where it was originally. The directory structure to which a LUN is to be restored must be the same as specified in the path. If this directory structure no longer exists, you must re-create it before restoring the file.

    Unless you enter -r and a path name, only the LUN at the end of the path_and_lun_name is reverted.

    If you did not use the -f option, Data ONTAP displays a warning message and prompts you to confirm your decision to restore the LUN.
  3. Type the following character to confirm that you want to restore the file:y
    Data ONTAP displays the name of the LUN and the name of the Snapshot copy for the restore operation. If you did not use the -f option, Data ONTAP prompts you to decide whether to proceed with the restore operation.
  4. Type the following character to continue with the restore operation:y
    Data ONTAP restores the LUN from the selected Snapshot copy.

Example of a single LUN restore

snap restore -t file -s payroll_backup_friday /vol/vol1/payroll_luns

storage_system> WARNING! This will restore a file from a snapshot into the active filesystem.  
If the file already exists in the active filesystem, it will be overwritten with the contents from the snapshot.
Are you sure you want to do this? y
You have selected file /vol/vol1/payroll_luns, snapshot payroll_backup_friday 
Proceed with restore? y

Data ONTAP restores the LUN called payroll_backup_friday to the existing volume and directory structure /vol/vol1/payroll_luns.

After a LUN is restored with SnapRestore, all data and all relevant user-visible attributes for that LUN in the active file system are identical to that contained in the Snapshot copy.