使用ONTAP从SnapMirror目标还原单个文件、LUN或NVMe命名空间
您可以从快照还原单个文件、LUN、一组文件或LUN、或者从SnapMirror目标卷还原NVMe命名空间。从NVMe.7开始、您还可以从ONTAP 9同步目标还原SnapMirror命名库。您可以将文件还原到原始源卷或其他卷。
要从SnapMirror同步目标还原文件或ONTAP 9 (从LUN .5开始受支持)、您必须先删除并释放此关系。
要将文件或 LUN 还原到的卷(目标卷)必须为读写卷:
-
如果源卷和目标卷具有通用快照(通常是还原到初始源卷时的情况)、SnapMirror将执行_incorental restore。
-
否则、SnapMirror将执行_baseline restore _、其中指定的快照及其引用的所有数据块都会传输到目标卷。
-
列出目标卷中的快照:
volume snapshot show -vserver <SVM> -volume volume
有关的详细信息
volume snapshot show
,请参见"ONTAP 命令参考"。以下示例显示了目标上的快照
vserverB:secondary1
: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.
-
从SnapMirror目标卷中的快照还原单个文件或LUN或者一组文件或LUN:
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>
有关的详细信息
snapmirror restore
,请参见"ONTAP 命令参考"。您必须从目标 SVM 或目标集群运行此命令。
以下命令会将文件和
file2`从初始目标卷中的 `secondary1`快照 `daily.2013-01-25_0010`还原到初始源卷的活动文件 `file1`系统中的同一位置 `primary1
: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
以下命令将文件和
file2`从初始目标卷中的 `secondary1`快照 `daily.2013-01-25_0010`还原到初始源卷的活动文件 `file1`系统中的其他位置 `primary1
。目标文件路径以 @ 符号开头,后跟原始源卷根中文件的路径。在此示例中、
file1
将还原到/dir1/file1.new
和file2将还原到/dir2.new/file2
开启primary1
: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
以下命令将文件和
file3`从初始目标卷中的 `secondary1`快照 `daily.2013-01-25_0010`还原到初始源卷的活动文件 `file1`系统中的不同位置 `primary1
,并将从snap1`还原 `file2`到的活动文件系统中的相同位置 `primary1
。在此示例中、为文件
file1
将还原到/dir1/file1.new
和file3
将还原到/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