3.2 ibbackup Command-Line Options

The command ibbackup --help displays usage information for the command-line options:

$ ibbackup --help
ibbackup version 3.5.2 MySQL Enterprise Backup 3.5.2
Copyright (c) 2002, 2010, Oracle and/or its affiliates.
Run 'ibbackup --help' for help and 'ibbackup --version' for version info.

ibbackup [--incremental lsn]
         [--sleep ms] [--suspend-at-end] [--compress [level]]
         [--include regexp] my.cnf backup-my.cnf
ibbackup --apply-log
         [--use-memory mb] [--uncompress]
ibbackup --apply-log --incremental
         [--use-memory mb] [--uncompress]
         incremental-backup-my.cnf full-backup-my.cnf

The first command line call above reads the data file and log file
information from my.cnf, and stores the backup data files and a backup
log file (named 'ibbackup_logfile') in the directories specified in the
backup-my.cnf file.

If --incremental is specified in the first command above, it instructs
ibbackup to make an INCREMENTAL backup that only contains data pages
whose latest modification has a log sequence number (lsn) greater than
lsn. Make sure that you have earlier taken a full

The .cnf files must contain explicit values of (ibbackup is not aware of defaults):
set-variable = innodb_log_files_in_group=...
set-variable = innodb_log_file_size=...

If --apply-log is specified, then the program prepares a backup for
starting mysql server on the backup. It applies the log records in
'ibbackup_logfile' to the data files, and creates new log files as
specified in backup-my.cnf. If you run with the --apply-log option,
then ibbackup does not check the hostname of the computer. You are allowed
to use ibbackup --apply-log in any computer without a need for a
MySQL Enterprise Backup license for that computer.

If --incremental is specified after --apply-log, then ibbackup
applies the incremental backup at incremental-backup-my.cnf to the FULL
backup at full-backup-my.cnf.

If --include regexp is specified, only those per-table data files which
match the given regular expression are included in the backup.
For each table with per-table data file a string of the form
db_name.table_name is checked against the regular expression.
If the regular expression matches the complete string db_name.table_name,
the table is included in the backup. The regular expression should be of
the POSIX 1003.2 "extended" form. Example: expression 'sales\.den.*'
matches all tables starting with "den" in database "sales".
Note that on Unix (not on Windows) the regular expression should be placed
in single quotes to prevent interpretation by the shell. This feature
is implemented with Henry Spencer's regular expression library.

--restore is an obsolete synonym for --apply-log. The use of --restore
is deprecated, because it may be dropped in the future.

--sleep ms instructs the program to sleep ms milliseconds after each 1 MB
of copied data. You can use this parameter to tune the additional disk i/o
load the backup program causes on the computer. ms must be < 1000000.
The default for ms is 0.

--suspend-at-end makes ibbackup to behave like this: when the backup
procedure is close to ending, ibbackup creates a file called
'ibbackup_suspended' to the log group home dir specified in backup-my.cnf
and waits until the user deletes that file 'ibbackup_suspended'.
You can use this option if you want to write a script which locks
and backs up your MyISAM tables at the end of ibbackup. In that way you
get a consistent snapshot of both InnoDB and MyISAM tables.

--use-memory mb is relevant only when --apply-log is specified.
It tells ibbackup that it can use mb megabytes of memory in recovery.
The default is 100 MB.

--compress instructs the program to compress the backup copies of data
files. Compressed data files are named by adding suffix '.ibz' to the
file name. Compression level can be specified as an optional argument
following --compress option. Compression level is an integer
between 0 and 9: 1 gives fastest compression, 9 gives best compression, 
and 0 means no compression. If compression level is not given, 
the default level 1 (fastest compression) is used.
Note that data files of per-table tablespaces for compressed tables do not
benefit from a second level of compression, so they are never compressed
in a backup.

--uncompress is relevant only when --apply-log is specified.
It tells ibbackup to recover data files from compressed copies.
Compressed data files are named with suffix '.ibz'.

The backup program does NOT make a backup of the .frm files of the tables,
and it does not make backups of MyISAM tables. To back up these items, either:

- Use the mysqlbackup program.

- Make backups of the .frm files with the Unix 'tar' or the Windows WinZip
or an equivalent tool both BEFORE and AFTER ibbackup finishes its work,
and also store the MySQL binlog segment that is generated between the moment
you copy the .frm files to a backup and the moment ibbackup finishes its work.
For extra safety, also use:

mysqldump -l -d yourdatabasename

to dump the table CREATE statements in a human-readable form before
ibbackup finishes its work.

From the binlog segment you see if any of the .frm files changed between the
moment you took a .frm files backup and the moment ibbackup finished
its work.

Please send bug reports to