Restore a single file from a snapshot with ONTAP
-
PDF of this doc site
-
Cluster administration
-
Volume administration
-
Logical storage management with the CLI
-
-
NAS storage management
-
Configure NFS with the CLI
-
Manage NFS with the CLI
-
Manage SMB with the CLI
-
Manage file access using SMB
-
-
-
Security and data encryption
-
Data protection and disaster recovery
-

Collection of separate PDF docs
Creating your file...
You can use the volume snapshot restore-file
command to restore a single file or LUN from a snapshot. 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.
If you are restoring an existing LUN, a LUN clone is created and backed up in the form of a snapshot. During the restore operation, you can read from and write to the LUN.
Files with streams are restored by default.
-
List the snapshots in a volume:
volume snapshot show -vserver SVM -volume volume
Learn more about
volume snapshot show
in the ONTAP command reference.The following example shows the snapshots 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.
-
Restore a file from a snapshot:
volume snapshot restore-file -vserver SVM -volume volume -snapshot snapshot -path file_path -restore-path destination_path
Learn more about
volume snapshot restore-file
in the ONTAP command reference.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