Backing up and restoring the multiplex

This section describes:

In addition to the usual reasons for backing up and restoring data, you can also use the restore operation to recreate the multiplex on a different system when no problems have occurred.

Multiplex backup list

Back up the IQ Store as described in “Types of backups”. You should also back up the IQ Local Stores on each query server and record the sizes of files used for IQ temporary dbspaces at all of the query servers. The last step of both IQ-level and system-level restores is synchronizing the query servers to propagate changes.)

You may wish to preserve the server.dbrlog.NNN files (stored in the write server’s directory under /repDirs/logfiles on UNIX or \repDirs\logfiles on Windows).

Updating your backup list

It is critically important 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 later, 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 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.

After each database backup, you may wish to truncate the transaction log, as described in Sybase IQ Performance and Tuning Guide.

StepsRestoring the multiplex

To restore the multiplex, you must first restore the Catalog Store and IQ Store, then restore any IQ Local Store(s) on query servers.

  1. Confirm with Technical Support that a restore operation is needed.

    If you have trouble opening your database on a query server, try doing a synchronize operation first. For details, see “Synchronizing query servers”.

  2. Confirm that database home directories for each server still exist. If not, create them or restore them from file system backups:

  3. Shut down every server in the multiplex (write server and query servers) using the Stop Multiplex command in Sybase Central.

    NoteIf automatic startup is enabled in your ODBC configuration, users on the same machine as the server may be able to start the server automatically and you will need to prevent this from happening while you are restoring the database.

  4. After stopping all servers, verify that the database shut down successfully. If you see an active asiqsrv12 process with the server name of a server in the multiplex (in a startup parameter) you should stop it.

    To verify on a UNIX system, use the ps command. For example:

    % ps -ef | grep asiqsrv12 
    
    janed   434     1  1   May 19 ?? 0:05 start_asiq -n myhost_myserver 
    -c 32MB -x tcpip(port=1234) mpxdb.db    
    janed  4751   442  1 16:42:14 pts/5    0:00 grep start_asiq
    

    To verify on a Windows system, use Task Manager. Look on the Processes tab for asiqsrv12.exe or find the IQ Server icon in the system tray and stop it using right-click and Shutdown.

  5. Move files required for debugging and reconfiguring the multiplex.

  6. Start the utility database from the write server directory using the write server’s server name:

    % start_asiq -n thoreau_Server01 -c 32MB 
    -x tcpip(port=1234) 
    

    If you are restoring the database to a different home directory or on a different machine from the one that created the backup, you must start the utility database using the multiplex override switch (-iqmpx_ov 1)

  7. Connect to the utility database (utility_db).

    % dbisql -c "eng=thoreau_Server01;uid=DBA;pwd=SQL;dbn=utility_db"
    
  8. Run the RESTORE command. For details, see the Sybase IQ Reference Manual.

  9. Shut down the write server.

  10. Make sure that the temporary dbspaces exist as before, on raw devices or as files of the correct length. See “Backing up the IQ Store and Catalog Store”. For information on starting without the IQ Temporary Store, see Sybase IQ Release Bulletin.

  11. Start the write server. and synchronize the multiplex. For more information, see “Synchronizing query servers”.