Table of ContentsView in Frames

Testing database applications: A special use of snapmirror resync

Testing software applications that run on a database can sometimes change or corrupt the database. To ensure that you do not lose data while testing such applications, you can copy the data to another volume for testing purposes, break the SnapMirror relationship and return the destination volume to writable state, and run the test application on it. Upon completion of the test, you can resynchronize the source and the destination volume.

Before you begin

Ensure that SnapMirror is enabled on the source and destination systems.

About this task

In the following procedure, you can use a combination of the snapmirror break and snapmirror resync commands to perform the following tasks:

Steps

  1. Create or choose a volume or qtree to be used as a destination for the volume or qtree containing the database. (This example uses a volume called Test_vol.)
  2. On the destination system, enter the following command to make the destination writable.snapmirror break Test_vol
    For a qtree, the path must be specified as shown in the following example. You must ensure that the qtree is quiesced before breaking the relationship.
    dst> snapmirror quiesce /vol/dst_vol/Testqtree
    dst> snapmirror break /vol/dst_vol/Testqtree
  3. Run the application on the data in the former destination (Test_vol).
  4. Check the data in the former destination (Test_vol).
  5. As required, choose one of the actions from the following table.
    If... Then...
    The data has been altered in some way that is not useful and you want to import a fresh copy of the data for further testing. From the destination system, enter the following command:snapmirror resync Test_vol
    Note: For a qtree, the path must be specified as shown in the following example:
    src> snapmirror resync dst_system:/vol/dst_vol/Testqtree /vol/src_vol/Testqtree

    SnapMirror makes the former destination volume into a SnapMirror destination again and updates the destination with the latest data.

    The data has not been altered adversely, or you wish to stop testing. The task is completed.
  6. Repeat Steps 3, 4, and 5, until you are satisfied with the testing.