Kinds of backups according to the level of service disruption
When it comes to formulating your backup strategy, performance and storage space are the key
considerations. You want the backup to complete quickly, with as little CPU overhead on the database
server as possible. You also want the backup data to be compact, so you can keep multiple backups on
hand to restore at a moment's notice. Transferring the backup data to a different system should be quick
and convenient. Under such considerations, various strategies for backing up your database often give
you different advantages, for the different trade-offs you make when choosing a particular strategy. To
choose the strategy that best fits your needs, you have to understand the nature of each kind of backups
that MySQL Enterprise Backup can perform, for which this section is giving a brief overview.
Kinds of backups according to the level of service disruption
Depending on how the database operations would be disrupted during a backup, the backup is classified
as “hot,”“warm,” or “cold”:
• Very Low to Low Level of Disruption: A hot backup is a backup performed while the database is running.
This type of backups does not block normal database operations. It captures even changes that occur
while the backup is happening. Comparing to the other backup types, it causes the least disruption to
the database server, and it is a desirable backup option when you want to avoid taking your application,
web site, or web service offline. However, before a hot backup can be restored, there needs to be an
extra process of preparing the backup to make it consistent (i.e., correctly reflecting the state of the state
of the database at the time the backup was completed). See Section 5.1.7, “Advanced: Preparing and
Restoring a Directory Backup” for more explanations.
When connected to a running MySQL server, MySQL Enterprise Backup performs hot backup for
InnoDB tables.
• Medium to High Level of Disruption: A warm backup is a backup performed with the database put under
a read-only state. This type of backups blocks any write operations to the tables during the backup
process, but still allow tables to be read.
When connected to a running MySQL server, MySQL Enterprise Backup backs up all MyISAM and other
non-InnoDB tables using the warm backup technique after all InnoDB tables have already been backed
up with the hot backup method. Therefore, to back up as much data as possible during the hot backup
phase, you should designate InnoDB as the default storage engine for new tables (which has been the
default setting since MySQL 5.5), or convert existing tables to use the InnoDB storage engine.
• High to Very High Level of Disruption: A cold backup is a backup created while the database is stopped.
Not only is it most disruptive to the database service, it also renders a lot of MySQL Enterprise Backup
features unusable (for example, the ability to retrieve information about the structure of the database
automatically through a database connection, so they do not have to be supplied to MySQL Enterprise
Backup by a configuration file or command-line options).
To avoid service disruption, you would typically perform a cold backup on a replication slave, which can
be stopped without taking down the entire application or web site.
Kinds of backups according to whether all data, or recent changes only are
backed up
According to whether you want to include all data into your backup or only the recent changes, and
according to recent changes since when, you can perform either a full backup, a differential backup, or an
incremental backup. The three types of backups have different levels of requirements for CPU overhead
and disk space, thus are suitable for different situations:
• A full backup includes the complete data from the database (except in cases where some tables are
excluded with the partial backup options).
6