This section describes:
Notes on back up and restore for multiplex servers and databases.
Special restrictions that apply to backup and restore operations in a multiplex environment
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.
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).
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.
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.
To restore the multiplex, you must first restore the Catalog Store and IQ Store, then restore any IQ Local Store(s) on query servers.
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”.
Confirm that database home directories for each server still exist. If not, create them or restore them from file system backups:
Shut down every server in the multiplex (write server and query servers) using the Stop Multiplex command in Sybase Central.
If 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.
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.
Move files required for debugging and reconfiguring the multiplex.
Make a file system copy of the .iqmsg file.
On each server, preserve any dbname.iqtmp dbspace files, to reconfigure the multiplex. If the IQ Temporary store is damaged, use the start the server with the -iqnotemp switch to drop and recreate the temporary store dbspaces. For more information, see Sybase IQ Release Bulletin.
Delete the following files from the write server:
<database_home>/<dbname>.db
<database_home/<dbname>.log
If a query server is damaged, however, drop it and re-add it after RESTORE but do not synchronize it.
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)
Connect to the utility database (utility_db).
% dbisql -c "eng=thoreau_Server01;uid=DBA;pwd=SQL;dbn=utility_db"
Run the RESTORE command. For details, see the Sybase IQ Reference Manual.
Shut down the write server.
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.
Start the write server. and synchronize the multiplex. For more information, see “Synchronizing query servers”.