The following information was omitted from Chapter 14, “Backup and Data Recovery.” Use steps 2 through 5 when restoring either full or incremental backups. Do not use this procedure to restore to a different query server.
Backing up and restoring query servers with IQ Local Stores
Enter commands in the following procedure without line breaks.
Connect to the query server using DBISQL or DBISQLC. Enter the following command:
BACKUP DATABASE FULL to 'full_path_to_backup_file'
Stop the query server.
In the write server’s directory, enter the following from a Command Prompt:
sync_qnode SQL query_server_name
In the query server’s directory, enter the following command:
dbbackup -y -d <full_path_of_the_query_server_dir> -c "uid=DBA;pwd=SQL;eng=<write_server_name>; links=tcpip{host=<write_server_host>; port=<write_server_port>}"
Omit spaces or line breaks from the -c parameter string. Line breaks in the preceding example are for readability only.
Delete the log file. For example:
rm <database>.log
If the log file or database name on the query server is different from the write server’s files, use the dblog utility to set the transaction log file name. You may use the relative path of the query server’s database file. For more about dblog, see Chapter 3 in the Sybase IQ Utility Guide. For example:
dblog -r -t all_types.log all_types.db
Start the query server without the database as:
start_asiq @params.cfg -n query_server_name -x 'tcpip{port=query_server_port}'
Connect to the query server using DBISQLC or DBISQL and specify the utility database in the connect string. Enter the following command:
RESTORE DATABASE '<database_name>' FROM '<full_path_to_backup_file>'
Stop the query server that was started without the database.
Restart the query server via Sybase Central.