5.1 mysqlbackup Command-Line Options

5.1.1 Subcommands
5.1.2 Standard Options
5.1.3 Connection Options
5.1.4 Server Repository Options
5.1.5 Backup Repository Options
5.1.6 Metadata Options
5.1.7 Compression Options
5.1.8 Incremental Backup Options
5.1.9 Partial Backup Options
5.1.10 Single-File Backup Options
5.1.11 Performance / Scalability / Capacity Options
5.1.12 Message Logging Options
5.1.13 Progress Report Options
5.1.14 Encryption Options
5.1.15 Cloud Storage Options
5.1.16 Options for Special Backup Types

The following sections describe the different modes of operation for mysqlbackup, and explain in details the applicable options for each of the modes of operation and for different situations.

The table below list all the command options for mysqlbackup. Use the hotlinks at the option names to jump to the detailed descriptions for the options.


The command options can also be specified in configuration files; see explanations in Section 5.2, “Configuration Files and Parameters”. The mysqlbackup command follows MySQL standard practice for handling duplicate options, whether specified in a configuration file, on the command line, or both. Options are processed first from configuration files, then from the command line. If an option is specified more than once, the last instance takes precedence.

Table 5.1 List of All Options

--backup-dir=PATHThe directory to store the backup data. 
--backup-image=IMAGESpecifies the path name of the backup image. 
--backup_innodb_checksum_algorithm=NAMEThe name of the checksum algorithm used for validating InnoDB tablespaces. 
--backup_innodb_data_file_path=VALUESpecifies Innodb system tablespace files' path and size in backup. 
--backup_innodb_data_home_dir=PATHBackup base directory for all InnoDB data files in the system tablespace. 
--backup_innodb_log_file_size=SIZEThe size in bytes of each InnoDB backup log file. 
--backup_innodb_log_files_in_group=NNumber of InnoDB log files in backup. 
--backup_innodb_log_group_home_dir=PATHBackup directory for InnoDB log files. 
--backup_innodb_page_size=SIZEThe page size for all InnoDB tablespaces in a MySQL instance. 
--backup_innodb_undo_directory=PATHThe relative or absolute directory path where InnoDB creates separate tablespaces for the undo logs. 
--backup_innodb_undo_logs=NUMBERNumber of rollback segments in the system tablespace that InnoDB uses within a transaction. 
--backup_innodb_undo_tablespaces=NUMBERThe number of tablespace files that the undo logs are divided between when a non-zero innodb_undo_logs setting is used. 
--character-sets-dir=PATHDirectory for character set files. 
--cloud-access-key-id=S3_KEY-IDAWS access key ID for logging onto Amazon S3.3.10.2
--cloud-aws-region=S3_REGIONRegion for Amazon Web Services that mysqlbackup access for S3.3.10.2
--cloud-bucket=S3_BUCKETThe storage bucket on Amazon S3 for the backup image.3.10.2
--cloud-object-key=S3_OBJECT-KEYThe Amazon S3 object key for the backup image.3.10.2
--cloud-proxy=PROXY-URL:PORTProxy address and port number for overriding the environment's default proxy settings for accessing cloud service.3.10.2
--cloud-secret-access-key=S3_ACCESS-KEYAWS secret access key.3.10.2
--cloud-service=SERVICECloud service for data backup or restoration.3.10.2
--cloud-trace=NUMPrint trace information for cloud operations.3.10.2
--comments=STRINGSpecifies comments string. 
--comments-file=PATHSpecifies path to comments file. 
--compressCreate backup in compressed format. 
--compress-level=LEVELSpecifies the level of compression. 
--compress-method=ALGORITHMSpecifies the compression algorithm. 
--connect-if-onlineUse connection only if available. 
--connect_timeout=SECONDSConnection timeout in seconds. 
--databases=LIST[Legacy] Specifies the list of non-InnoDB tables to back up. 
--databases-list-file=PATH[Legacy] Specifies the pathname of a file that lists the non-InnoDB tables to be backed up. 
--datadir=PATHPath to mysql server data directory. 
--debugPrint debug information. 
--decryptDecrypt backup image written in an MEB Secure File. 
--default-character-set=nameSet the default character set. 
--defaults-extra-file=PATHRead this file after the global files are read. 
--defaults-file=PATHOnly read default options from the given file. 
--defaults-group-suffix=strAlso read option groups with the usual names and a suffix of str. 
--disable-manifestDisable generation of manifest files for a backup operation. 
--dst-entry=PATHUsed with single-file backups to extract a single file or directory to a user-specified path. 
--encryptEncrypt backup image and write it in an MEB Secure File. 
--exclude-tables=REGEXPExclude in backup tables whose names match the regular expression REGEXP.3.10.0
--exec-when-locked="utility arg1 arg2 ..."Execute the specified utility when all tables are locked near the end of the execution. 
--forceForce overwriting of data, log, or image files, depending on the operation. 
--helpDisplay help. 
--host=nameHost name to connect. 
--include=REGEXP[Legacy] Backup only those per-table innodb data files which match the regular expression REGEXP. 
--include-tables=REGEXPInclude in backup tables which match the regular expression REGEXP.3.10.0
--incrementalSpecifies that the associated backup or backup-to-image operation is incremental. 
--incremental-backup-dir=PATHSpecifies the location under which to store data from an incremental backup. 
--incremental-base=mode:argumentThe specification of base backup for --incremental option. 
--incremental-with-redo-log-onlySpecifies the incremental backup of InnoDB tables to be based on copying redo log to the backup, without including any InnoDB datafiles in the backup. 
--innodb_checksum_algorithm=NAMEThe name of the checksum algorithm used for validating InnoDB tablespaces. 
--innodb_data_file_path=VALUESpecifies InnoDB system tablespace files' path and size. 
--innodb_data_home_dir=PATHSpecifies base directory for all InnoDB data files in the shared system tablespace. 
--innodb_log_file_size=SIZEThe size in bytes of each InnoDB log file in the log group. 
--innodb_log_files_in_group=NThe number of InnoDB log files. 
--innodb_log_group_home_dir=PATHThe directory path to InnoDB log files. 
--innodb_page_size=SIZEThe page size for all InnoDB tablespaces in a MySQL instance. 
--key=KEYThe symmetric key used for encryption and decryption. 
--key-file=FILEThe pathname of a file that contains the symmetric key used for encryption and decryption.3.10.0
--limit-memory=MBThe memory in MB available for the MEB operation. 
--login-path=nameRead options from the named login path in the .mylogin.cnf login file. 
--messages-logdir=PATHSpecifies the path name of an existing directory for storing the message log. 
--no-connectionDo not connect to server. 
--no-defaultsDo not read default options from any given file. 
--no-history-loggingDisable history logging even if connection is available. 
--no-lockingDisable locking of tables even if connection is available. 
--number-of-buffers=NUMBERSpecifies the exact number of memory buffers to be used for the backup operation. 
--on-disk-full=optionSpecifies the behavior when a backup process encounters a disk-full condition. 
--only-innodbBack up only InnoDB data and log files. 
--only-innodb-with-frm[={related|all}][Legacy] Back up only InnoDB data, log files, and the .frm files associated with the InnoDB tables. 
--only-known-file-typesIncludes only files of a list of known types in the backup. 
--page-reread-count=numberMaximum number of page re-reads. 
--page-reread-time=MSWait time before a page re-read. 
--password=stringConnection password. 
--pipealias for –protocol=pipe. 
--port=#TCP portnumber to connect to. 
--print-defaultsPrint a list of option values supplied by defaults files and exit. 
--process-threads=NUMBERSpecifies the number of process-threads for the backup operation. 
--progress-interval=SECONDSInterval between progress reports in seconds. 
--protocol=nameConnection protocol. 
--read-threads=NUMBERSpecifies the number of read-threads for the backup operation. 
--sbt-database-name=NAMEUsed as a hint to the Media Management Software (MMS) for the selection of media and policies for tape backup. 
--sbt-environment=VAR1=value1[,VAR2=value2[,...]] SBT API provider)Comma separated list of environment variable assignments to be given to the SBT library. 
--sbt-lib-path=PATHPath name of the SBT library used by software that manages tape backups. 
--secure-authRefuse client connecting to server if it uses old (pre-4.1.1) protocol. 
--shared-memory-base-name=valueIt designates the shared-memory name used by a Windows server to permit clients to connect using shared memory (Windows only). 
--show-progress[=destinations]Instructs mysqlbackup to periodically output short progress reports known as progress indicators on its operation. 
--skip-messages-logdirDisable logging to teelog file. 
--skip-unused-pagesSkip unused pages in tablespaces when backing up InnoDB tables. 
--slave-infoCapture information needed to set up an identical slave server. 
--sleep=MSTime to sleep in milliseconds after copying each 1MB of data. 
--socket=nameSocket file to use to connect. 
--src-entry=PATHIdentifies a file or directory to extract from a single-file backup. 
--sslEnable SSL for connection (automatically enabled with other --ssl- flags). 
--ssl-caCA file in PEM format (implies –ssl). 
--ssl-capathCA directory (check OpenSSL docs,implies --ssl). 
--ssl-certX509 cert in PEM format (implies --ssl). 
--ssl-cipherSSL cipher to use (implies --ssl). 
--ssl-keyX509 key in PEM format (implies --ssl). 
--ssl-verify-server-certVerify server's "Common Name" in its cert against hostname used when connecting. 
--start-lsn=LSNSpecifies the highest LSN value included in a previous backup. 
--suspend-at-endPauses the mysqlbackup command when the backup procedure is close to ending. 
--trace=LEVELTrace level of messages by mysqlbackup. 
--uncompressUncompress the compressed backup before applying log. 
--use-tts[={with-minimum-locking|with-full-locking}]Enable selective backup of InnoDB tables using transportable tablespaces (TTS). 
--user=nameDatabase user name to connect. 
--verbosePrint more verbose information. 
--versionDisplay version information. 
--with-timestampCreate a subdirectory underneath the backup directory with a name formed from the timestamp of the backup operation. 
--write-threads=NUMBERSpecifies the number of write-threads for the backup operation.