volume snapshot restore
Restore the volume to a snapshot.
Availability: This command is available to cluster and Vserver administrators at the admin privilege level.
Description
The volume snapshot restore
command restores a snapshot to be the read-write parent volume for the volume family. This replaces the current working copy of the volume with the snapshot that results in a loss of all changes made since the snapshot was created.
|
You should manually update all the SnapMirror relationships of a volume immediately after you restore its snapshot. Not doing so can result in unusable SnapMirror relationships that must be deleted and re-created. |
After the restore is complete, the size of the flexible volume will be set to either the current volume size or the snapshot size - whichever is greater.
Parameters
-vserver <vserver name>
- Vserver-
This specifies the Vserver that contains the volume on which the specified snapshot to be restored is saved.
-volume <volume name>
- Volume-
This specifies the parent read-write volume whose snapshot is to be restored to take its place.
-snapshot <snapshot name>
- Snapshot-
This specifies the snapshot that is to be restored to be the read-write parent volume.
[-force <true>]
- Force Restore-
If you use this parameter, the snapshot is restored even if the volume has one or more newer snapshots which are currently used as reference snapshot by SnapMirror. If a restore is done in this situation, this will cause future SnapMirror transfers to fail. The SnapMirror relationship may be repaired using snapmirror resync command if a common snapshot is found between the source and destination volume. If there is no common snapshot between the source and the destination volume, a baseline SnapMirror copy would be required. If you use this parameter, the operation is also allowed on application tagged volumes.
[-preserve-lun-ids {true|false}]
- Preserve LUN Identifiers-
This option enables you to select whether the snapshot restore needs to be non-disruptive to clients due to LUN or NVMe namespace identifiers changing. If you use this option and set it to
true
, or choose to not use this option at all, thevolume snapshot restore
command fails if the system determines that it cannot be non-disruptive with regards to LUN or NVMe namespace identifiers. If you use this option and set it tofalse
, the restore operation proceeds even if this might cause client-visible effects. In this case, administrators should take the LUNs or NVMe namespaces offline before proceeding.
Examples
The following example restores a snapshot named vol3_snap_archive to be the parent read-write volume for the volume family. The existing read-write volume is named vol3 and is located on a Vserver named vs0:
cluster1::> volume snapshot restore -vserver vs0 -volume vol3 -snapshot vol3_snap_archive