Restore the contents of a volume from a SnapMirror destination

Contributors

You can restore the contents of an entire volume from a Snapshot copy in a SnapMirror destination volume. You can restore the volume’s contents to the original source volume or to a different volume.

What you’ll need

To restore a volume from a SnapMirror Synchronous destination (supported starting with ONTAP 9.5), you must first delete and release the relationship.

About this task

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 copy (as is typically the case when you are restoring to the original source volume).

    Note

    The command fails if there is not a common Snapshot copy. 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 copy and all the data blocks it references are transferred to the source volume.

Restoring the contents of a volume is a disruptive operation. CIFS 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.

Steps
  1. 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.
  2. Restore the contents of a volume 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

    For complete command syntax, see the man page.

    Note

    You must run this command from the destination SVM or the destination cluster.

    The following command restores the contents of the original source volume primary1 from the Snapshot copy daily.2013-01-25_0010 in the original destination volume secondary1:

    cluster_dst::> snapmirror restore -source-path vserverB:secondary1 -destination-path vserverA:primary1 -source-snapshot daily.2013-01-25_0010
    
    Warning: All data newer than Snapshot copy 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.
  3. Remount the restored volume and restart all applications that use the volume.