Restoring to a previous consistent state after a failed upgrade

If the CONVERSION_GUARD configuration parameter is enabled and an upgrade fails, you can run the onrestorept command to undo the changes that are made during the upgrade and restore to a consistent state.

Before you begin

The following prerequisites must be met:

  • The directory that is specified by the RESTORE_POINT_DIR configuration parameter contains a subdirectory with the files that were stored during the failed upgrade attempt. The name of this subdirectory will be your instance's SERVERNUM setting, e.g. "15".
  • The server must be offline before you run the onrestorept -y command.

About this task

Note that with your environment set up for your new instance, you will execute the previous Informix version's onrestorept utility. The following steps assume that an OLDINFORMIXDIR environment variable has been set to your previous version's informix directory.

To restore the server to a previous consistent state after a failed upgrade:

Procedure

Run the $OLDINFORMIXDIR/bin/onrestorept -y command, which displays prompts while the command runs. If you do not specify -y, you must respond to every prompt that appears.
Important: Do not start the server until the $OLDINFORMIXDIR/bin/onrestorept utility finishes running. Starting the server before the $OLDINFORMIXDIR/bin/onrestorept utility finishes running can damage the server, requiring the server to be restored from a backup copy.

What to do next

After you restore the server to a consistent state, you can resume work in the source version of the server or find and fix the problem that caused the upgrade to fail.
Important: To start Enterprise Replication after the $OLDINFORMIXDIR/bin/onrestorept utility restores the database server to a consistent state, you must use the cdr cleanstart command.

Before you attempt another upgrade, run the $OLDINFORMIXDIR/bin/onrestorept -c command to remove the files in the directory that is specified in the RESTORE_POINT_DIR configuration parameter. After a successful upgrade, the server automatically deletes restore point files from that directory.