restorefromsnapshot

Use the restorefromsnapshot command to restore a parent volume group to a snapshot taken at an earlier point in time.

Syntax

Read syntax diagramSkip visual syntax diagram restorefromsnapshot -snapshotidsnapshot_id-snapshotsnapshot_name-parentuidid-snapshotsnapshot_name-volumegroupvolumegroup_namevolumegroup_id-volumeslist_of_volume_idslist_of_volume_name

Parameters

-snapshot name
Specifies the name of the snapshot to be restored.
-volumegroup volumegroup_id_or_name | -parentuid id
Specifies the name or ID of the volume group with the snapshot to be restored.
-parentuid id
Specifies the UID identifying the parent volumes of the snapshot.
-snapshotid snapshot_id
Specifies the ID of the snapshot to be removed.
-volumes list_of_volume_ids | list_of_volume_name
Specifies the name or ID of the parent volumes.

Description

This command allows a user to restore a parent volume group to a snapshot taken at an earlier point in time.

It is possible that, after a snapshot being taken, volumes in that volume group are deleted. Those volumes are removed from the volume group and will remain in the deleting state. If a volume group restore is requested from a snapshot that is taken at a time when those now deleted volumes were active, then those volumes are re-added to the volume group and will be changed to active state.

It is possible to restore a subset of the volumes within the volume group that uses the -volumes parameter. A list of up to 512 colon-separated volumes can be specified when using this parameter.

Except for the deleted volumes scenario described above the composition of the volume group must be the same at the time of the restore as what it was at the time that the snapshot was taken. If volumes have been added to or removed from the volume group in the time between the snapshot being taken and the restore being requested then those volumes must be removed from or added back into the volume group before the restore can run. The actual volumes that are involved in the creation of the snapshot must be in the volume group when starting a restore, that is, it is not possible to create new volumes within the volume group in order to replace volumes that have been moved.

If the volumes have been expanded between the time that the snapshot was taken and the restore requested that then the restore will fail. The user has to shrink the parent volumes back to the size they were when the snapshot was taken before a restore goes ahead. If a volume has been expanded after a snapshot is taken and a snapshot is then taken of the volume group with that expanded volume, the later snapshots must be cleaned out before the volume can be shrunk to the size required by the earlier snapshot.

An invocation example

restorefromsnapshot -snapshotid 5

The resulting output:

No feedback.

An invocation example

restorefromsnapshot -snapshot snapshot2 -volumegroup volumegroup1

The resulting output:

No feedback.

An invocation example

restorefromsnapshot -snapshot snapshot6 -parentuid 1

The resulting output:

No feedback.

An invocation example

svctask restorefromsnapshot -snapshot noon -volumegroup sourceGroupA -volumes 4:5

The resulting output:

No feedback.

An invocation example

svctask restorefromsnapshot -snapshot noon -parentuid 3 -volumes vol8

The resulting output:

No feedback.

An invocation example

svctask restorefromsnapshot -snapshotid 21 -volumes 9:10:11

The resulting output:

No feedback.