The innobackupex Option Reference

This page documents all of the command-line options for the innobackupex Perl script.

Options

--help

This option displays a help screen and exits.

--version

This option displays the innobackupex version and copyright notice and then exits.

--apply-log

Prepare a backup in BACKUP-DIR by applying the transaction log file named xtrabackup_logfile located in the same directory. Also, create new transaction logs. The InnoDB configuration is read from the file backup-my.cnf created by innobackupex when the backup was made.

--redo-only

This option is passed directly to xtrabackup’s xtrabackup --apply-log-only option. This forces xtrabackup to skip the “rollback” phase and do a “redo” only. This is necessary if the backup will have incremental changes applied to it later. See the xtrabackup documentation for details.

--copy-back

Copy all the files in a previously made backup from the backup directory to their original locations.

--include

This option is a regular expression to be matched against table names in databasename.tablename format. It is passed directly to xtrabackup ‘s xtrabackup --tables option. See the xtrabackup documentation for details.

--defaults-file

This option accepts a string argument that specifies what file to read the default MySQL options from. It is also passed directly to xtrabackup ‘s defaults-file option. See the xtrabackup documentation for details.

--databases

This option accepts a string argument that specifies the list of databases that innobackupex should back up. The list is of the form databasename1[.table_name1] databasename2[.table_name2] .... If this option is not specified, all databases containing MyISAM and InnoDB tables will be backed up. Please make sure that --databases contains all of the InnoDB databases and tables, so that all of the innodb.frm files are also backed up. In case the list is very long, this can be specified in a file, and the full path of the file can be specified instead of the list. (See option --tables-file.)

--tables-file

This option accepts a string argument that specifies the file in which there are a list of names of the form database.table, one per line. The option is passed directly to xtrabackup ‘s --tables-file option.

--throttle

This option accepts an integer argument that specifies the number of I/O operations (i.e., pairs of read+write) per second. It is passed directly to xtrabackup’s xtrabackup --throttle option.

--export

This option is passed directly to xtrabackup --export option. It enables exporting individual tables for import into another server. See the xtrabackup documentation for details.

--use-memory

This option accepts a string argument that specifies the amount of memory in bytes for xtrabackup to use for crash recovery while preparing a backup. Multiples are supported providing the unit (e.g. 1MB, 1GB). It is used only with the option --apply-log. It is passed directly to xtrabackup ‘s xtrabackup --use-memory option. See the xtrabackup documentation for details.

--password = 'PASSWORD'

This option accepts a string argument specifying the password to use when connecting to the database. It is passed to the mysql child process without alteration. See mysql –help for details.

--user = 'USER'

This option accepts a string argument that specifies the user (i.e., the MySQL username used when connecting to the server) to login as, if that’s not the current user. It is passed to the mysql child process without alteration. See mysql –help for details.

--port

This option accepts a string argument that specifies the port to use when connecting to the database server with TCP/IP. It is passed to the mysql child process. It is passed to the mysql child process without alteration. See mysql –help for details.

--socket

This option accepts a string argument that specifies the socket to use when connecting to the local database server with a UNIX domain socket. It is passed to the mysql child process without alteration. See mysql –help for details.

--host

This option accepts a string argument that specifies the host to use when connecting to the database server with TCP/IP. It is passed to the mysql child process without alteration. See mysql –help for details.

--no-timestamp

This option prevents creation of a time-stamped subdirectory of the BACKUP-ROOT-DIR given on the command line. When it is specified, the backup is done in BACKUP-ROOT-DIR instead.

--slave-info

This option is useful when backing up a replication slave server. It prints the binary log position and name of the master server. It also writes this information to the xtrabackup_slave_info file as a CHANGE MASTER command. A new slave for this master can be set up by starting a slave server on this backup and issuing a CHANGE MASTER command with the binary log position saved in the xtrabackup_slave_info file.

--no-lock

Use this option to disable table lock with FLUSH TABLES WITH READ LOCK. Use it only if ALL your tables are InnoDB and you DO NOT CARE about the binary log position of the backup. If you are considering to use --no-lock because your backups are failing to acquire the lock, this could be because of incoming replication events preventing the lock from succeeding. Please try using --safe-slave-backup to momentarily stop the replication slave thread, this may help the backup to succeed and you then don’t need to resort to using --no-lock.

--ibbackup = 'autodetect'

This option accepts a string argument that specifies which xtrabackup binary should be used. The string should be the command used to run XtraBackup. The option can be useful if the xtrabackup binary is not in your search path or working directory and the database server is not accessible at the moment. If this option is not specified, innobackupex attempts to determine the binary to use automatically. By default, xtrabackup is the command used. When option --apply-log is specified, the binary is used whose name is in the file xtrabackup_binary in the backup directory, if that file exists, or will attempt to autodetect it. However, if --copy-back is selected, xtrabackup is used unless other is specified.

--incremental

This option tells xtrabackup to create an incremental backup, rather than a full one. It is passed to the xtrabackup child process. When this option is specified, either --incremental-lsn or --incremental-basedir can also be given. If neither option is given, option --incremental-basedir is passed to xtrabackup by default, set to the first timestamped backup directory in the backup base directory.

--incremental-basedir

This option accepts a string argument that specifies the directory containing the full backup that is the base dataset for the incremental backup. It is used with the --incremental option.

--incremental-dir

This option accepts a string argument that specifies the directory where the incremental backup will be combined with the full backup to make a new full backup. It is used with the --incremental option.

--incremental-lsn

This option accepts a string argument that specifies the log sequence number (LSN) to use for the incremental backup. It is used with the --incremental option. It is used instead of specifying --incremental-basedir. For databases created by MySQL and Percona Server 5.0-series versions, specify the as two 32-bit integers in high:low format. For databases created in 5.1 and later, specify the LSN as a single 64-bit integer.

--extra-lsndir

This option accepts a string argument that specifies the directory in which to save an extra copy of the xtrabackup_checkpoints file. It is passed directly to xtrabackup‘s --extra-lsndir option. See the xtrabackup documentation for details.

--remote-host

This option accepts a string argument that specifies the remote host on which the backup files will be created, by using an ssh connection.

--stream

This option accepts a string argument that specifies the format in which to do the streamed backup. The backup will be done to STDOUT in the specified format. Currently, the only supported format is tar. Uses tar4ibd, which is available in XtraBackup distributions. If you specify a path after this option, it will be interpreted as the value of tmpdir. If both --stream and --incremental are passed to innobackupex, the incremental parameters are ignored and a full backup is created.

--tmpdir

This option accepts a string argument that specifies the location where a temporary file will be stored. It should be used when --remote-host or --stream is specified. For these options, the transaction log will first be stored to a temporary file, before streaming or copying to a remote host. This option specifies the location where that temporary file will be stored. If the option is not specifed, the default is to use the value of tmpdir read from the server configuration.

--tar4ibd

Uses tar4ibd in --stream mode. It is enabled by default if no other command is specified (e.g. --force-tar).

--force-tar

This option forces the use of tar when creating a streamed backup, rather than tar4ibd, which is the default.

--scpopt = '-Cp -c arcfour'

This option accepts a string argument that specifies the command line options to pass to scp when the option --remost-host is specified. If the option is not specified, the default options are -Cp -c arcfour.

--sshopt

This option accepts a string argument that specifies the command line options to pass to ssh when the option --remost-host is specified.

--parallel

This option accepts an integer argument that specifies the number of threads the xtrabackup child process should use to back up files concurrently. Note that this option works on file level, that is, if you have several .ibd files, they will be copied in parallel. If you have just single big .ibd file, it will have no effect. It is passed directly to xtrabackup’s xtrabackup --parallel option. See the xtrabackup documentation for details.

--safe-slave-backup

Stop slave SQL thread and wait to start backup until Slave_open_temp_tables in SHOW STATUS is zero. If there are no open temporary tables, the backup will take place, otherwise the SQL thread will be started and stopped until there are no open temporary tables. The backup will fail if Slave_open_temp_tables does not become zero after --safe-slave-backup-timeout seconds. The slave SQL thread will be restarted when the backup finishes.

--safe-slave-backup-timeout

How many seconds --safe-slave-backup` should wait for Slave_open_temp_tables to become zero. Defaults to 300 seconds.

--rsync

Use the rsync utility to optimize local file transfers. When this option is specified, innobackupex uses rsync to copy all non-InnoDB files instead of spawning a separate cp for each file, which can be much faster for servers with a large number of databases or tables. This option cannot be used together with --remote-host or --stream.

Percona XtraBackup
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

How innobackupex Works

Next topic

The xtrabackup Binary

This Page



© Copyright 2010-2012, Percona Ireland Ltd.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
Created using Sphinx 1.1.3.
This documentation is developed in Launchpad as part of the Percona XtraBackup source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
]]>