Veritas Storage Foundation Intelligent Storage Provisioning 5.0.1 Administrators Guide, HP-UX 11i v3, First Edition, November 2009

# vxsnap -g snapdg reattach prepsnap source=myvol sourcedg=mydg
After resynchronization of the snapshot volume is complete, it is placed in the
ACTIVE state.
You can use the vxsnap snapwait command (but not vxsnap syncwait) to wait
for the resynchronization of the reattached volume to complete, as shown in the
following command:
# vxsnap -g snapdg snapwait myvol mirvol=prepsnap
Restoring a volume from an instant snapshot
You may want to reinstate the contents of a volume from a backup or modified
replica within a snapshot volume.
The following command restores a volume:
# vxsnap [-g diskgroup] restore [nmirrors=number] vol \
[source=snapvol] [destroy=yes|no]
For a full instant snapshot, some or all of its plexes may be reattached to the
parent volume or to a specified source volume in the snapshot hierarchy above
the snapshot volume. If destroy=yes is specified, all the plexes of the snapshot
are reattached and the snapshot volume is removed.
For a space-optimized instant snapshot, the cached data is used to restore the
contents of the specified volume. The snapshot itself remains unchanged by the
operation.
For this operation to succeed, the volume that is being restored and the snapshot
volume must not be open to any application. For example, any file systems that
are configured on either volume must first be unmounted.
It is not possible to restore a volume from an unrelated volume.
The destroy and nmirror attributes are not supported for space-optimized instant
snapshots.
The following example demonstrates how to restore the volume, myvol, from the
space-optimized snapshot, snap3myvol:
# vxsnap -g mydg restore myvol source=snap3myvol
Administering instant snapshots
Creating instant snapshots
120