9.4 Using the MySQL Enterprise Backup Logs

The mysql.backup_progress table lets you monitor backup jobs as they run. The mysql.backup_history table lets you see the results of completed jobs. Because these tables are created with the CSV storage engine, you can query them from SQL, or parse the text files from an application or script.

To skip updating these tables for a backup operation, use the --no-history-logging option.

backup_progress Table

Each row in the backup_progress table records a state change or message from a running backup job. The backup_progress table has the following columns:

Because the CSV storage engine cannot represent NULL values directly, the logs use a -1 value instead, for example in the binlog_pos column if binary logging is not enabled.

Use the backup_id value to group together the information for a single backup operation, and to correlate with the corresponding row in the backup_history table after the job is finished.

Use the error_code and error_message values to track the progress of the job, and detect if a serious error occurs that requires stopping the backup operation.

Use the current_time and current_state values to measure how long each part of the backup operation takes, to help with planning the time intervals for future backups.

backup_history Table

Each row in the backup_history table records the details of one completed backup job, produced by the mysqlbackup command. The backup_history table has the following columns:

Use the end_lsn value to automate operations related to incremental backups. When you take a full or incremental backup, you specify the end LSN from that backup as the starting LSN for the next incremental backup.

Use the values that correspond to backup-related configuration settings, such as mysql_data_dir, innodb_data_home_dir, and backup_destination, to confirm that the backups are using the right source and destination directories.

Use the values exit_state, last_error, and last_error_code to evaluate the success or failure of each backup.

If last_error is 'NO_ERROR', the backup operation was successful. In case of any errors, you can retrieve the full list of errors for that backup operation from the backup_progress table.