MySQL Enterprise Backup User's Guide (Version 8.0.36)

20.11 Message Logging Options

mysqlbackup writes important progress and error information to the stderr stream. The information is often very valuable for tracking down problems that occur during an operation. Starting from MySQL Enterprise Backup 3.9, the output to the stderr stream is also saved to a log file by default (for most mysqlbackup operations), so that the error information can be easily accessed in any debug process.

The message logging works like a tee process on a Unix-like system, in which the output of a program is split to be both displayed and saved to a file. The log file thus produced is named in the following format: MEB_timestamp_operation.log, where operation is the mysqlbackup operation that was run (e.g., backup, apply-log, etc.), and timestamp is the date and time at which the operation was run. Here are some examples of names for the log files:

MEB_2013-06-24.16-32-43_backup.log
MEB_2013-06-28.11-07-18_apply_log.log
MEB_2013-06-29.10-08-06_list_image.log

The following options control the message logging function:

The following are some examples showing how the message logging is controlled.

This creates a log file for the backup operation in the directory /home/backup_dir/meta due to the default settings:

mysqlbackup -uroot --port=3306 --backup-dir=/home/backup_dir backup

This skips message logging for the backup operation:

mysqlbackup -uroot --port=3306 --backup-dir=/home/backup_dir \
      --skip-messages-logdir backup

This creates a log file for the apply-log operation in an existing directory named /home/teelog_dir, rather than the default location:

mysqlbackup -uroot --port=3306 --backup-dir=/home/backup_dir \
      --messages-logdir=/home/teelog_dir apply-log

This creates a log file for the list-image operation in an existing directory named /home/teelog_dir:

mysqlbackup -uroot --port=3306 --backup-image=/backup/my.mbi \
      --messages-logdir=/home/teelog_dir list-image