Restoring database servers for Informix

Before you can restore a database server, ensure that the system configuration, the relevant database server parameter file, and, most importantly, the archive source are correct.

Procedure

  1. Check the system configuration.

    Ensure that the configuration of the current system is the same as the configuration of the system when the server was archived.

    The system configuration includes disk paths, chunk file sizes, shared memory kernel parameters, and so on. The system configuration settings must be identical to or larger than the settings for the last Level 0 archive. For example, when restoring from tape to replace a bad disk, the new disk must use the same path to the chunk file dbspaces. Also, the directories must be at least the size they were for the archive.

  2. Check the configuration file.

    Ensure that the configuration file currently in use is identical to the configuration file used to archive the server.

    The configuration file, $CCM_HOME/informix/etc/servername, must be identical to the configuration file used to perform the Level 0 archive. A copy of this file is always saved when a Level 0 archive is performed.

    Ensure that Level 0 archives reflect the current configuration file by performing a Level 0 archive immediately after you change the file.

  3. Log on the database server as user root.
  4. Set user to informix.
    root# su - informix
    Password: *****

    If you did not set up CCM_HOME and PATH for user informix during installation, set these environment variables now. See Setting environment variables for UNIX.

  5. Take the database server offline.

    $ ccmsrv offline

  6. If you archived to tape, mount the archive tape.

    If you archived to tape, insert the most recent tape for the archive level you want to restore. If you are restoring incremental archives, the ccmsrv restore command prompts you for the other archive tapes.

  7. If you archived to a directory, perform the following steps.

    You must perform these steps for each archive file you restore. If you are restoring incremental archives, you must perform these steps when prompted for the next level of "tapes."

    1. Change directory to the Informix® /etc directory.

      $ cd $CCM_HOME/informix/etc

    2. Identify the archive file to restore.

      For example, choose to restore the Level 0 archive file called hydra1,level-0,10_19_99_09_20 from the /vol/hydra1/archive_data directory, as follows.

    3. Remove the symbolic link of the tape device.

      $ rm hydra1.tapedev

    4. Link the tape device to the archive file.

      For example, link hydra1.tapedev to the Level 0 archive file, hydra1,level-0,10_19_99_09_20, as follows:

      $ ln -s /vol/hydra1/archive_data/hydra1,level
      -0,10_19_99_09_20 \hydra1.tapedev

      Specify the archive device (file) with the ccmsrv restore command, so that the correct archive file is found.

  8. Restore the database server.

    For example, restore the database server from the tape on /dev/rts8, as follows:

    $ ccmsrv restore -device /dev/rst8

    Or, restore the database server from the /vol/hydra1/archive_data directory, as follows:

    $ ccmsrv restore -device $CCM_HOME/etc/informix/hydra1.tapedev

    The ccmsrv restore command prompts you to mount a tape (or an archive file) for each archive level. If you are restoring only the Level 0 (full) archive, type n to subsequent prompts for Level 1 and Level 2 (incremental) archives.

    Note: You also are prompted to restore logical log backups. To do so, you must already have backed up the logical log files as described in Managing logical log files. Type y to this prompt if you want to restore from the logical log file backup.
  9. Bring the database server online.

    $ ccmsrv online

  10. Exit from user informix.

Feedback