Documentation Home
MySQL Enterprise Backup 9.3 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


20.11 Message Logging Options

mysqlbackup writes important progress and error information to thestderr 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 thestderr stream is also saved to a log file by default (for mostmysqlbackup operations), so that the error information can be easily accessed in any debug process.

The message logging works like atee 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, whereoperation is themysqlbackup operation that was run (e.g.,backup,apply-log, etc.), andtimestamp 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.logMEB_2013-06-28.11-07-18_apply_log.logMEB_2013-06-29.10-08-06_list_image.log

The following options control the message logging function:

  • --skip-messages-logdir

    Skip message logging. Logging is turned on by default (except for thelist-image andvalidate operations; see the description for the--messages-logdir option for details), and it is turned off by this option.

  • --messages-logdir=path

    Command-Line Format--messages-logdir=PATH
    TypeDirectory name
    Default Valuebackup_dir/meta

    Specifies the path name of an existing directory for storing the message log. If the specified directory does not exist, message logging fails and returns an error message. When this option is omitted, the default directory ofbackup_dir/meta is used, wherebackup_dir is the directory specified with the--backup-dir option.

    Note

    Use this option to turn on message logging for thelist-image andvalidate operations. Message logging is turned off by default for the two operations, because they do not modify any files and a message log is usually not required for debugging them. And because the default path name ofbackup_dir/meta is not meaningful for the two operations, this option is required for both turning on message logging and for supplying the path name of a directory in which to save the log file. However, if the--skip-messages-logdir option is also specified, it takes precedence and message logging is skipped.

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

This creates a log file for thebackup 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 thebackup operation:

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

This creates a log file for theapply-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 thelist-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