5.1.1.1 Backup Operations

The backup operations are the most frequently performed tasks
by MySQL Enterprise Backup. Various kinds of backups can be
performed by adding different options, like using
--compress or
--incremental for compressed or
incremental backups. Here is the syntax for the
mysqlbackup command for performing a backup
operation:

Performs the initial phase of a backup. The second phase
is performed later by running
mysqlbackup again with the
apply-log option.

backup-and-apply-log

A combination of backup and
apply-log. Not compatible with
incremental backups. Also incompatible with the
--compress option.

backup-to-image

Produces a single-file backup rather than a directory
structure holding the backup files. Requires the
--backup-image option to
specify the destination file. Can be used to stream the
backup to a storage device or another system without ever
storing the data on the database server. You can specify
--backup-image=-, representing
standard output, allowing the output to be piped to
another command. To avoid mixing normal informational
messages with backup output, the --help
message, errors, alerts, and normal informational messages
are always printed to standard error.

The following example shows a minimal backup with the
mysqlbackup command, with any necessary
connection parameters for the database in the
[mysqlbackup] section of the default
MySQL configuration file:

There is a separate directory dedicated to incremental
backup. Both this directory and the one for full backups can
be specified in the my.cnf file, and
the appropriate directory is used depending on the type of
backup. Both the incremental backup data and an earlier full
backup are needed to do a successful restore operation.