The following instructions describe how to recover the RiskVision database to the point of a media failure:
- Restore the database with the latest full backup file; the MySQL dump file mysqldump-YYYYMMDDhhmmss.sql contained in the server and database backup file -YYYYMMDDhhmmss.zip that has the latest timestamp YYYYMMDDhhmmss. See instructions in the Restoring the Database section.
- Check in the MySQL dump file mysqldump-YYYYMMDDhhmmss.sql to find the value of MASTER_LOG_FILE. The value must be in the form of ‘.nnnnnn', where nnnnnn is a sequence number. This is the first incremental MySQL binary log file created after the backup was performed.
- Go to the directory for the MySQL incremental backups (see the Backup Destination Directory section), run the mysqlbinlog and mysql commands to bring the database to the point when failure occurred.
For example, if nnnnnn is 000100, and there are three binary log files newer than .000100, run this command:
mysqlbinlog .000100 .000101 .000102 .000103 | mysql -uroot -p rootpassword
When the command completes successfully, the database will be recovered to the previous point where the failure occurred.