ONTAP 9 Manuals ( CA08871-402 )

Restore a single file from a Snapshot copy

You can use the volume snapshot restore-file command to restore a single file or LUN from a Snapshot copy. You can restore the file to a different location in the parent read-write volume if you do not want to replace an existing file.

About this task

If you are restoring an existing LUN, a LUN clone is created and backed up in the form of a Snapshot copy. During the restore operation, you can read from and write to the LUN.

Files with streams are restored by default.

Steps
  1. List the Snapshot copies in a volume:

    volume snapshot show -vserver SVM -volume volume

    For complete command syntax, see the man page.

    The following example shows the Snapshot copies in vol1:

    clus1::> volume snapshot show -vserver vs1 -volume vol1
    
    Vserver Volume Snapshot                State    Size  Total% Used%
    ------- ------ ---------- ----------- ------   -----  ------ -----
    vs1	 vol1   hourly.2013-01-25_0005  valid   224KB     0%    0%
                   daily.2013-01-25_0010   valid   92KB      0%    0%
                   hourly.2013-01-25_0105  valid   228KB     0%    0%
                   hourly.2013-01-25_0205  valid   236KB     0%    0%
                   hourly.2013-01-25_0305  valid   244KB     0%    0%
                   hourly.2013-01-25_0405  valid   244KB     0%    0%
                   hourly.2013-01-25_0505  valid   244KB     0%    0%
    
    7 entries were displayed.
  2. Restore a file from a Snapshot copy:

    volume snapshot restore-file -vserver SVM -volume volume -snapshot snapshot -path file_path -restore-path destination_path

    For complete command syntax, see the man page.

    The following example restores the file myfile.txt:

    cluster1::> volume snapshot restore-file -vserver vs0 -volume vol1 -snapshot daily.2013-01-25_0010 -path /myfile.txt
Top of Page