Back Up the Right Files

Back up required files and optional files.

Required Files

You must back up the following files:
  • All SYSTEM dbspace files, typically named dbname.db

    Note: There may be additional dbspaces in the catalog store, and are listed in SYSDBSPACES.
  • The transaction log file, which is required for system recovery, typically named dbname.log

  • The IQ_SYSTEM_MAIN dbspace file, typically named dbname.iq

  • Files for any additional dbspaces that have been added to the IQ main store.

Save the lengths of the following files:
  • The IQ_SYSTEM_TEMP dbspace file, typically named dbname.iqtmp

  • Additional files that have been added to IQ_SYSTEM_TEMP

Backing up the temporary dbspaces is not required. IQ can reconstruct any temporary dbspace provided that it sees a file of the correct length at the time the database starts. Therefore, you may simply keep records of the sizes of the files or raw devices used to hold the temporary dbspaces.

Optional Files

You should back up the ASCII message files such as dbname.iqmsg and the $IQDIR16/logfiles/*.srvlog and $IQDIR15/logfiles/*.stderr files, even though these files are not required for a restore. If problems occur during a restore, theĀ .iqmsg file contains information that proves that the database was shut down before the backup started.

These files may be useful in diagnosing the cause of the database failure you are recovering from. Be sure to make a copy before restoring, for use in later analysis.

If IQ message log wrapping is enabled, you will probably want to back up theĀ .iqmsg file so that all messages are accessible in the event you need them for diagnostic purposes.

If message log archiving is enabled (the IQMsgMaxSize server option or the -iqmsgsz server startup switch is not equal to zero and the IQMsgNumFiles server option or the -iqmsgnum server start up switch is not equal to zero), the server automatically backs up the message log archives. The maximum amount of message log that is archived is 128GB, which is sufficient in most cases.

Note: Backing up the message log archives is required before a server restart. After the server restarts, the existing log archives are ignored and a new archive is created when the dbname.iqmsg file is full. To preserve the old archive logs, back up the files before restarting the server.

Keeping Your Backup List Updated

It is critical to add to your system backup specification any dbspaces that are added to the database, whether they are in SYSTEM, IQ_SYSTEM_MAIN, or IQ_SYSTEM_TEMP. If a dbspace is added several months down the road, or after some turnover in your organization, you may miss this step.

To ensure that you are backing up all the files you need, use a script for system-level backups. In the script, before starting the backup, compare a select from SYSFILE (for the system dbspaces) and from SYSIQFILE (for the IQ dbspaces) to a list of dbspaces known to be in the system backup specification.

Raw Devices and Symbolic Links

If your database files are on raw devices, be sure your system backup is backing up the raw device contents, not just the name of the device in /dev/*.

If symbolic links are used for raw device names, as recommended, be sure the system backup utility follows the symbolic link and backs up the device.