Resynchronizing your database to the snapshot

If your database becomes corrupted, you can use reverse resynchronization to recover the database from a clone. The reverse resynchronization feature of Veritas Database FlashSnap enables you to resynchronize the primary database or volume with a clone database or snapshot volume.

Reverse resynchronization requires the primary database to be inactive so that it remains unchanged.

Warning:

Upon completion of reverse resynchronization, the content of the original database is discarded. Storage Checkpoints taken on the original database before or after the snapshot was created are discarded. The db2ed_vmsnap -o reverse_resync_commit command cannot be undone and should be used with extreme caution.

Before resynchronizing a database to a snapshot, make sure the following conditions have been met:

Prerequisites

  • You must be logged in as the DB2 instance owner.

    Before you can reverse resynchronize the snapshot image, review the database snapshot procedure and create the snapshot.

  • Before you execute the reverse_resync_commit command, you must remove the old archive log when ODM is enabled.

  • The mount point for the primary database must be owned by the DB2 instance owner.

  • If a clone database has been created, you must shut it down and unmount the file systems using the command before you can reverse resynchronize the snapshot image. This command also deports the disk group.

    See Shutting down the clone database and unmounting file systems.

  • The primary database must be inactive.

Usage notes

  • The db2ed_vmsnap command can only be executed on the primary host.

To begin reverse resynchronization

To abort reverse resynchronization

To commit reverse resynchronization changes

This example is valid only for the online_snapshot mode.

Reverse resynchronization is started on the primary host:

$ /opt/VRTS/bin/db2ed_vmsnap -D PROD -f snap1 \
-o reverse_resync_begin
db2ed_vmsnap started at 2006-05-26 13:37:11
Files and control structures were changed successfully.
Database was catalogued successfully.
DBT1000I  The tool completed successfully.
db2ed_vmsnap ended at 2006-05-26 13:37:48

Reverse resychronization is aborted on the primary host.

$ /opt/VRTS/bin/db2ed_vmsnap -D PROD -f snap1 \
-o reverse_resync_abort
db2ed_vmsnap started at 2006-05-26 13:38:16
DB20000I  The FORCE APPLICATION command completed successfully.
DB21024I  This command is asynchronous and may not be effective
immediately.

DB20000I  The UNCATALOG DATABASE command completed successfully.
DB21056W  Directory changes may not be effective until the
directory cache is refreshed.
Files and control structures were changed successfully.
Database was catalogued successfully.
DBT1000I  The tool completed successfully.
DB20000I  The UNCATALOG DATABASE command completed successfully.
DB21056W  Directory changes may not be effective until the
directory cache is refreshed.
DB20000I  The CATALOG DATABASE command completed successfully.
DB21056W  Directory changes may not be effective until the
directory cache is refreshed.
The option reverse_resync_abort has been completed.
db2ed_vmsnap ended at 2006-05-26 13:39:31

Reverse resychronization changes are committed on the primary host.

$ /opt/VRTS/bin/db2ed_vmsnap -D PROD -f snap1 \
-o reverse_resync_commit
db2ed_vmsnap started at 2006-05-26 13:40:32
DB20000I  The FORCE APPLICATION command completed successfully.
DB21024I  This command is asynchronous and may not be effective
immediately.

DB20000I  The UNCATALOG DATABASE command completed successfully.
DB21056W  Directory changes may not be effective until the
directory cache is refreshed.
DB20000I  The CATALOG DATABASE command completed successfully.
DB21056W  Directory changes may not be effective until the
directory cache is refreshed.
db2ed_vmsnap ended at 2006-05-26 13:41:35

More Information

Summary of database snapshot steps

Creating a snapshot (db2ed_vmsnap)