Back Up the Correct Files

Back up required files and optional files.

Required Files

  • All SYSTEM dbspace files, typically named dbname.db, including any additional dbspaces in the catalog store, listed in SYSDBSPACES
  • The transaction log file, which is required for system recovery, typically named dbname.log
  • The IQ_SYSTEM_MAIN dbspace file and 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

You are not required to back up temporary dbspaces. SAP Sybase IQ can reconstruct any temporary dbspace provided there is 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

Back up the ASCII message files such as dbname.iqmsg, the $IQDIR16/logfiles/*.srvlog, and $IQDIR16/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. Make a copy before restoring, for use in later analysis.

If IQ message log wrapping is enabled, back up theĀ .iqmsg file so that all messages are accessible if 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 startup 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: Before a server restart, you must back up the message log archives. After the server restarts, existing log archives are ignored and a new archive is created when the dbname.iqmsg file is full.

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.

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 you use symbolic links for raw device names, as recommended, be sure the system backup utility follows the symbolic link and backs up the device.