Restore a single file, LUN, or NVMe namespace from a SnapMirror destination
You can restore a single file, LUN, a set of files or LUNs from a Snapshot copy, or an NVMe namespace from a SnapMirror destination volume. Beginning with ONTAP 9.7, you can also restore NVMe namespaces from a SnapMirror synchronous destination. You can restore files to the original source volume or to a different volume.
To restore a file or LUN from a SnapMirror synchronous destination (supported beginning with ONTAP 9.5), you must first delete and release the relationship.
The volume to which you are restoring files or LUNs (the destination volume) must be a read-write volume:
-
SnapMirror performs an incremental restore if the source and destination volumes have a common Snapshot copy (as is typically the case when you are restoring to the original source volume).
-
Otherwise, SnapMirror performs a baseline restore, in which the specified Snapshot copy and all the data blocks it references are transferred to the destination volume.
-
List the Snapshot copies in the destination volume:
volume snapshot show -vserver <SVM> -volume volume
For complete command syntax, see the man page.
The following example shows the Snapshot copies on the
vserverB:secondary1
destination:cluster_dst::> volume snapshot show -vserver vserverB -volume secondary1 Vserver Volume Snapshot State Size Total% Used% ------- ------ ---------- ----------- ------ ----- ------ ----- vserverB secondary1 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 single file or LUN or a set of files or LUNs from a Snapshot copy in a SnapMirror destination volume:
snapmirror restore -source-path <SVM:volume>|<cluster://SVM/volume>, … -destination-path <SVM:volume>|<cluster://SVM/volume>, … -source-snapshot snapshot -file-list <source_file_path,@destination_file_path>
For complete command syntax, see the man page.
You must run this command from the destination SVM or the destination cluster.
The following command restores the files
file1
andfile2
from the Snapshot copydaily.2013-01-25_0010
in the original destination volumesecondary1
, to the same location in the active file system of the original source volumeprimary1
:cluster_dst::> snapmirror restore -source-path vserverB:secondary1 -destination-path vserverA:primary1 -source-snapshot daily.2013-01-25_0010 -file-list /dir1/file1,/dir2/file2 [Job 3479] Job is queued: snapmirror restore for the relationship with destination vserverA:primary1
The following command restores the files
file1
andfile2
from the Snapshot copydaily.2013-01-25_0010
in the original destination volumesecondary1
, to a different location in the active file system of the original source volumeprimary1
.The destination file path begins with the @ symbol followed by the path of the file from the root of the original source volume. In this example,
file1
is restored to/dir1/file1.new
and file2 is restored to/dir2.new/file2
onprimary1
:cluster_dst::> snapmirror restore -source-path vserverB:secondary1 -destination-path vserverA:primary1 -source-snapshot daily.2013-01-25_0010 -file-list /dir/file1,@/dir1/file1.new,/dir2/file2,@/dir2.new/file2 [Job 3479] Job is queued: snapmirror restore for the relationship with destination vserverA:primary1
The following command restores the files
file1
andfile3
from the Snapshot copydaily.2013-01-25_0010
in the original destination volumesecondary1
, to different locations in the active file system of the original source volumeprimary1
, and restoresfile2
fromsnap1
to the same location in the active file system ofprimary1
.In this example, the file
file1
is restored to/dir1/file1.new
andfile3
is restored to/dir3.new/file3
:cluster_dst::> snapmirror restore -source-path vserverB:secondary1 -destination-path vserverA:primary1 -source-snapshot daily.2013-01-25_0010 -file-list /dir/file1,@/dir1/file1.new,/dir2/file2,/dir3/file3,@/dir3.new/file3 [Job 3479] Job is queued: snapmirror restore for the relationship with destination vserverA:primary1