Skip to main content

Restoring data from a SnapVault backup

After selecting the SnapVault backup destination volume, you must perform the restore operation either to a new volume to test the backed-up data or to an existing volume to restore the lost or corrupted data. You must log in to the command line interface (CLI) to run the following snapmirror restore command.You can restore the contents of an entire volume from a Snapshot copy in a SnapMirror destination volume.You can restore the contents of a volume to the original source volume or to a different volume.

Before you begin

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 either 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
    Command execution will fail if there is not a common Snapshot copy. Contents of a volume cannot be restored 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.

Note
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 being performed.

If the destination volume for the restore operation has compression enabled while the source volume not, disable compression on the destination volume. You need to re-enable compression after the restore operation is completed.

Any quota rules defined for the destination volume are deactivated before the restore operation is performed. You can run the volume quota modify command to reactivate quota rules after the restore operation is completed.

  1. List the Snapshot copies in the destination volume: volume snapshot show -vserver SVM -volume volume

    For complete command syntax, see the man page.

    Example

    The following example shows the Snapshot copies on the vserverB:secondary1:

    cluster_dst::> volume snapshot show -vserver vserverB -volume secondary1

    Vserver Volume Snapshot State Size Total% Used%
    --------- ------- ----------- -------------- --------- --------------------
    vserverB secondary1 hourly.2020-01-25_0005 valid 224KB 0% 0%
    daily.2020-01-25_0010 valid 92KB 0% 0%
    hourly.2020-01-25_0105 valid 228KB 0% 0%
    hourly.2020-01-25_0205 valid 236KB 0% 0%
    hourly.2020-01-25_0305 valid 244KB 0% 0%
    hourly.2020-01-25_0405 valid 244KB 0% 0%
    hourly.2020-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.

    Example

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

    cluster_dst::> snapmirror restore -source-path vserverB:secondary1 -
    destination-path vserverA:primary1 -source-snapshot daily.2020-01-25_0010

    Warning: All data newer than Snapshot copy daily.2020-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.2020-01-25_0010.

    Initial SnapMirror transfers may be large and therefore will take a long time to complete due to bandwidth constraints. By using network compression, you can speed up the initial SnapMirror transfers. Network compression is natively built into SnapMirror to enable data compression over the network for SnapMirror transfers. It does not, however, compress data at rest. SnapMirror network compression is not the same as volume compression.

    SnapMirror network compression can be enabled or disabled by the -is-network-compression-enabled option in SnapMirror policy. It cannot be enabled for an active transfer. To enable compression for an existing transfer, you must first abort the transfer, set the -is-network-compression-enabled option to true in the SnapMirror policy, and then resume the transfer.

    SnapMirror network compression increases resource utilization on both the SnapMirror source and destination systems. Therefore, you need to evaluate the resource usage and benefits before deploying compression. For example, compression might not be useful for high-bandwidth, low-latency connections, but it can be useful for connections that have relatively low bandwidth, such as WAN connections.

    For example:

    Cluster_dst::> snapmirror restore -source-path vserverB:secondary1 -destination-path vserverA:primary -transfer-priority normal -use-network-compression true

    To check the network compression output, run the following command to learn about the status of the network compression:Cluster_dst::> snapmirror show -destination-path vserverA:primary -instance

  3. Remount the restored volume and restart all applications that use the volume.
Note

Unlike network compression, the deduplication option cannot be included in the snapmirror restore command. To use the deduplication feature on the SnapVault volume, you will have to assign an efficiency policy to a volume to perform deduplication or data compression operations by running the volume efficiency modify command. If an efficiency policy is assigned to a SnapVault secondary volume, only the volume efficiency priority attribute is considered during volume efficiency operations. The job schedules are ignored and the deduplication operation is performed when incremental updates are made to the SnapVault secondary volume.

You can enable deduplication on a FlexVol volume to achieve storage efficiency. You can enable postprocess deduplication on all volumes and inline deduplication on volumes that reside on AFA or Flash Pool aggregates. You must contact technical support if you want to enable inline deduplication on other types of volumes. For a FlexVol volume, you must have verified that enough free space is available for deduplication metadata in volumes and aggregates. Beginning with ONTAP 9.4, inline deduplication is enabled by default on AFA systems.

Choices
  • Run the volume efficiency on command to enable postprocess deduplication.

    Example

    The following command enables postprocess deduplication on volume secondary1:volume efficiency on -vserver vserverB -volume secondary1

  • Run the volume efficiency on command followed by the volume efficiency modify command with the -inline-dedupe option set to true to enable both postprocess deduplication and inline deduplication.

    Example

    The following commands enable both postprocess deduplication and inline deduplication on a volume:volume efficiency on -vserver vserverB -volume secondary1volume efficiency modify -vserver vserverB -volume secondary1 -inline-dedupe true

    The following command enables only inline deduplication on a volume:volume efficiency modify -vserver vserverB -volume secondary1 -policy inline-only -inline-dedupe true

Verification

Verify that the setting has been changed by checking the volume efficiency settings:volume efficiency show -instance