Restore volume contents from an ONTAP SnapMirror destination
You can restore the contents of an entire volume from a snapshot in a SnapMirror destination volume. You can restore the volume's contents to the original source volume or to a different volume.
This procedure applies to FAS, AFF, and current ASA systems. If you have an ASA r2 system (ASA A1K, ASA A90, ASA A70, ASA A50, ASA A30, ASA A20, or ASA C30), follow these steps to restore data. ASA r2 systems provide a simplified ONTAP experience specific to SAN-only customers.
The destination volume for the restore operation must be one of the following:
-
A read-write volume, in which case SnapMirror performs an incremental restore, provided that the source and destination volumes have a common snapshot (as is typically the case when you are restoring to the original source volume).
The command fails if there is not a common snapshot. You cannot restore the contents of a volume to an empty read-write volume.
-
An empty data protection volume, in which case SnapMirror performs a baseline restore, in which the specified snapshot and all the data blocks it references are transferred to the source volume.
Restoring the contents of a volume is a disruptive operation. SMB traffic must not be running on the SnapVault primary volume when a restore operation is running.
If the destination volume for the restore operation has compression enabled, and the source volume does not have compression enabled, disable compression on the destination volume. You need to re-enable compression after the restore operation is complete.
Any quota rules defined for the destination volume are deactivated before the restore is performed. You can use the volume quota modify
command to reactivate quota rules after the restore operation is complete.
When data in a volume is lost or corrupted, you can roll back your data by restoring from an earlier snapshot.
This procedure replaces the current data on the source volume with data from an earlier snapshot version. You should perform this task on the destination cluster.
You can restore a volume's contents using System Manager or the ONTAP CLI.
-
Click Protection > Relationships, and then click the source volume name.
-
Click
and then select Restore.
-
Under Source, the source volume is selected by default. Click Other Volume if you want to choose a volume other than the source.
-
Under Destination, choose the snapshot you want to restore.
-
If your source and destination are located on different clusters, on the remote cluster, click Protection > Relationships to monitor the restore progress.
-
List the snapshots in the destination 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 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 the contents of a volume from a snapshot in a SnapMirror destination volume:
snapmirror restore -source-path <SVM:volume>|<cluster://SVM/volume> -destination-path <SVM:volume>|<cluster://SVM/volume> -source-snapshot <snapshot>
Learn more about
snapmirror restore
in the ONTAP command reference.You must run this command from the original source SVM or the original source cluster. The following command restores the contents of the original source volume
primary1
from the snapshotdaily.2013-01-25_0010
in the original destination volumesecondary1
:cluster_src::> snapmirror restore -source-path vserverB:secondary1 -destination-path vserverA:primary1 -source-snapshot daily.2013-01-25_0010 Warning: All data newer than snapshot daily.2013-01-25_0010 on volume vserverA:primary1 will be deleted. Do you want to continue? {y|n}: y [Job 34] Job is queued: snapmirror restore from source vserverB:secondary1 for the snapshot daily.2013-01-25_0010.
-
Remount the restored volume and restart all applications that use the volume.
Other ways to do this in ONTAP
To perform these tasks with… | See this content… |
---|---|
System Manager Classic (available with ONTAP 9.7 and earlier) |