Testing software applications that run on a database can sometimes change or even corrupt the database. To ensure that you do not lose data while testing such software applications, you can copy the data to another volume for testing purposes, break the destination volume to return it to writable state, and run the test application on it. Upon completion of the test, you can resynchronize the source and the destination volume to restore the data and repeat the testing as often as you need.
Before You Begin
Ensure that
SnapMirror is enabled on the source and destination systems.
Considerations
In the following procedure, you can use a combination of the
snapmirror break and
snapmirror resync commands to:
- Make a destination volume writable for testing.
- Restore the newly writable volume to its original state if further testing is required.
Steps
- 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.)
- 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
- Run the application on the data in the former destination (Test_vol).
- Check the data in the former destination (Test_vol).
- Choose the appropriate action 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.
|
| Has not been altered deleteriously, or you wish to stop testing |
You have finished. |
- Repeat steps 3, 4, and 5, until you are satisfied with the testing.