Volume Manager provides snapshot backups of volume devices.
This is done through the vxassist command and other commands. There are various
procedures for doing backups, depending upon the requirements for
integrity of the volume contents. These procedures have the same starting
requirement: a plex that is large enough to store the complete contents
of the volume. The plex can be larger than necessary, but if a plex
that is too small is used, an incomplete copy results.
The recommended approach to volume backup is by using the vxassist command which is easy to use.The vxassist snapstart, snapwait, and snapshot tasks provide a way to do online backup of volumes
with minimal disruption to users.
The vxassist snapshot procedure consists of two steps:
Running vxassist snapstart to create a snapshot mirror
Running vxassist snapshot to create a snapshot volume
The vxassist snapstart step creates a write-only backup plex which gets
attached to and synchronized with the volume. When synchronized with
the volume, the backup plex is ready to be used as a snapshot mirror.
The end of the update procedure is indicated by the new snapshot mirror
changing its state to SNAPDONE. This change can be tracked by the vxassist snapwait task, which waits until at least one of the mirrors changes
its state to SNAPDONE. If the attach process fails, the snapshot mirror
is removed and its space is released.
Once the snapshot mirror is synchronized, it continues being
updated until it is detached. You can then select a convenient time
at which to create a snapshot volume as an image of the existing
volume. You can also ask users to refrain from using the system
during the brief time required to perform the snapshot (typically
less than a minute). The amount of time involved in creating the
snapshot mirror is long in contrast to the brief amount of time
that it takes to create the snapshot volume.
The online backup procedure is completed by running the vxassist snapshot command on a volume with a SNAPDONE mirror. This task detaches the finished snapshot
(which becomes a normal mirror), creates a new normal volume and
attaches the snapshot mirror to the snapshot volume. The snapshot
then becomes a normal, functioning mirror and the state of the snapshot
is set to ACTIVE.
If the snapshot procedure is interrupted, the snapshot mirror
is automatically removed when the volume is started.
Use the following steps to perform a complete backup using
the vxassist command:
Create a snapshot mirror for a volume with
the following command:
# vxassist snapstart volume_name |
When the snapstart step is complete and the mirror is in a
SNAPDONE state, choose a convenient time to complete the
snapshot task. Inform users of the upcoming snapshot and
ask them to save files and refrain from using the system briefly
during that time.
Create
a snapshot volume that reflects the original volume with this command:
# vxassist snapshot volume_name temp_volume_name |
Use fsck (or some utility appropriate for the application
running on the volume) to clean the temporary volume's
contents. For example, use this command:
# fsck -y /dev/vx/rdsk/temp_volume_name |
Copy the temporary volume to tape, or to some other
appropriate backup media.
Remove the new volume with this command:
# vxedit -rf rm temp_volume_name |