MySQL Backup provides status and progress logging. This
capability can be enabled or disabled. If logging is enabled,
tables in the mysql
database or log files can
be used as the destinations for log output. These features are
similar to those provided for the general query log and slow
query log (see Selecting General Query and Slow Query Log Output Destinations), although the
options and variables are different.
This section describes how to control MySQL Backup logging. For a description of what is logged, see Section 1.7.2, “MySQL Backup Log Contents”.
Log control at server startup.
The --log-backup-output
option
specifies the destination for log output, if logging is enabled,
but the option does not in itself enable the logs. The syntax
for this option is
--log-backup-output[=
:
value
,...]
If --log-backup-output
is
given with a value, the value can be a comma-separated list
of one or more of the words TABLE
(log to
tables), FILE
(log to files), or
NONE
(do not log to tables or files).
NONE
, if present, takes precedence over
any other specifiers.
If --log-backup-output
is
omitted or given without a value, the default logging
destination is TABLE
.
The --backup_history_log
and
--backup_progress_log
variables
control how logging is done to the history and progress logs for
the selected log destinations. (By default, both logs are
enabled.) These options take an optional argument of 1 or 0 to
enable or disable the log. If either log is enabled, the server
opens the corresponding log file and writes startup messages to
it. However, further logging to the file does not occur unless
the FILE
log destination is selected.
Examples:
With no logging arguments, MySQL Backup logs to the log tables by default.
To write log entries to the log tables and log files, use
--log-backup-output=TABLE,FILE
to select both log destinations.
Log control at runtime. Several system variables are associated with log tables and files and enable runtime control over logging:
The log_backup_output
system variable
indicates the current logging destinations. It can be
modified at runtime to change the destinations.
The backup_history_log
and
backup_progress_log
variables indicate whether the history and progress logs are
enabled (ON
) or disabled
(OFF
). You can set these variables at
runtime to control whether the logs are enabled.
The backup_history_log_file
and backup_progress_log_file
variables
indicate the names of the history and progress log files.
You can set these variables at runtime to change the names
of the log files.