This section describes a procedure for implementing off-host online backup for a volume in a private disk group. The intention is to present an outline of how to set up a regular backup cycle. It is beyond the scope of this guide to describe how to configure a database to use this procedure, or how to perform the backup itself.
To back up a volume in a private disk group
# vxprint -g
volumedg -F%instant
volume
This command returns on
if the volume can be used for instant snapshot operations; otherwise, it returns off
.
# vxprint -g
volumedg -F%fastresync
volume
This command returns on
if FastResync is enabled; otherwise, it returns off
.
If FastResync is disabled, enable it using the following command on the primary host:
# vxsnap -g
volumedg -b addmir
volume mirvol=
snapvol
\
snapvoldg
mirdg=
You can use the vxsnap
snapwait
command to wait for synchronization of the linked snapshot volume to complete:
# vxsnap -g
volumedg snapwait
volume mirvol=
snapvol
\
mirdg=snapvoldg
Note This step sets up the snapshot volumes, and starts tracking changes to the original volumes. When you are ready to create a backup, proceed to step 5.
source=
volume
/snapvol=
snapvol
/snapdg=
snapvoldg
If a database spans more than one volume, you can specify all the volumes and their snapshot volumes using one command, as shown in this example:
# vxsnap -g dbasedg make \
source=vol1/snapvol=snapvol1/snapdg=sdg \
fsck
on the volume. The following are sample commands for checking and mounting a file system:
# fsck -F vxfs /dev/vx/rdsk/
snapvoldg/
snapvol
# mount -F vxfs /dev/vx/dsk/
snapvoldg/
snapvol
mount_point
Back up the file system at this point, and then use the following command to unmount it.
# vxsnap -g
snapvoldg
reattach
snapvol
source=
vol \
volumedg
sourcedg=
For example, to reattach the snapshot volumes svol1
, svol2
and svol3
:
# vxsnap -g sdg reattach svol1 \
source=vol1 sourcedg=dbasedg \
svol2 source=vol2 sourcedg=dbasedg \
svol3 source=vol3 sourcedg=dbasedg
You can use the vxsnap
snapwait
command to wait for synchronization of the linked snapshot volume to complete:
Repeat step 5 through step 15 each time that you need to back up the volume.