16.1 标准选项

标准期权是一般性质的期权,或未归入任何其他特定期权组的期权:

  • mysql命令 还存在以下标准选项 。这些选项的完整描述可以在 MySQL 参考手册中找到,可以通过例如 Server Option, System Variable, and Status Variable Reference访问。这些选项必须在任何其他 mysqlbackup选项之前指定,包括其余的标准选项:

    --print-defaults             Print the program argument list and exit.
    --no-defaults                Don't read default options from any option file.
    --defaults-file=PATH         Only read default options from the given file. It has to be the first option to be specified, if used. 
    --defaults-extra-file=PATH   Read this file after the global files are read.
    --defaults-group-suffix=str  Also read option groups with the usual names and a suffix of str.
  • 以下选项在mysqlbackupmysql 之间也是通用 的,它们的完整描述可以在 MySQL 参考手册中找到,可以通过例如 Server Option, System Variable, and Status Variable Reference访问。但是,mysqlbackup不像mysql那样接受这些选项的任何缩写形式 (例如,对于 mysqlbackup--help ,您必须使用 instead of ): -h

    --help      Display help. 
    --version   Display version information.
  • mysqlbackup 有更多标准选项可用 :

    --verbose:打印更详细的信息。

    --debug= STRING:打印额外的调试信息。该选项接受以下参数:

    • all:打印所有操作的附加调试信息

    • sbt:使用系统备份到磁带 (SBT)接口 打印操作的附加调试信息

    • null:当为选项指定空字符串或根本没有参数时,mysqlbackup 的行为就好像--verbose 使用了该选项一样。

    --force:默认情况下,某些操作会在被告知写入现有文件时停止而不是覆盖任何用户数据或日志文件。--force 允许以下内容:

    警告

    For any restore operations, do NOT attempt to restore data to a non-empty data directory using the --force option; doing so may cause data corruption and other unexpected behaviors. Do not use the --force option with a copy-back or a copy-back-and-apply-log operation, except for the special cases described below.

    • Overwriting of InnoDB data and log files during the apply-log and apply-incremental-backup operations.

    • When restoring a TTS backup, changing temporarily the value of innodb_file_format on the server, in order to allow restores of per-table InnoDB data files regardless of their format.

    • Replacing of an image file during an backup-to-image or backup-dir-to-image operation.

    • Restoring a partial image backup created with MySQL Enterprise Backup 3.11 or earlier; the --force option is required, due to a known issue (Bug# 20485910).

    • Restoring a backup onto a server where the directory pointed to by the .bl file in the backup (a copy of the .isl file from the backed-up server) already contains .ibd data files.

    --trace=level

    Command-Line Format --trace=LEVEL
    Type Enumeration
    Default Value 0
    Valid Values

    0

    1

    2

    3

    Trace level of mysqlbackup messages. The permissible levels, in the order of increasing fineness, are:

    • 0 - INFO (information, warnings, errors)

    • 1 - FINE (more information given than at trace level 0)

    • 2 - FINER (finer level of information given than at trace level 1)

    • 3 - FINEST(可提供的最佳信息级别)