Backup and Recovery Types
618
• Replication enables you to maintain identical data on multiple servers. This has several benefits,
such as enabling client query load to be distributed over servers, availability of data even if a given
server is taken offline or fails, and the ability to make backups with no impact on the master by using
a slave server. See
Chapter 16, Replication
.
• MySQL Cluster provides a high-availability, high-redundancy version of MySQL adapted for the
distributed computing environment. See
Chapter 17, MySQL Cluster
. For information specifically
about MySQL Cluster backup, see
Section 17.5.3, “Online Backup of MySQL Cluster”
.
7.1. Backup and Recovery Types
This section describes the characteristics of different types of backups.
Logical Versus Physical (Raw) Backups
Logical backups save information represented as logical database structure (
CREATE DATABASE
,
CREATE TABLE
statements) and content (
INSERT
statements or delimited-text files). Physical backups
consist of raw copies of the directories and files that store database contents.
Logical backup methods have these characteristics:
• The backup is done by querying the MySQL server to obtain database structure and content
information.
• Backup is slower than physical methods because the server must access database information and
convert it to logical format. If the output is written on the client side, the server must also send it to
the backup program.
• Output is larger than for physical backup, particularly when saved in text format.
• Backup and restore granularity is available at the server level (all databases), database level (all
tables in a particular database), or table level. This is true regardless of storage engine.
• The backup does not include log or configuration files, or other database-related files that are not
part of databases.
• Backups stored in logical format are machine independent and highly portable.
• Logical backups are performed with the MySQL server running. The server is not taken offline.
• Logical backup tools include the
mysqldump
program and the
SELECT ... INTO OUTFILE
statement. These work for any storage engine, even
MEMORY
.
• To restore logical backups, SQL-format dump files can be processed using the
mysql
client. To load
delimited-text files, use the
LOAD DATA INFILE
statement or the
mysqlimport
client.
Physical backup methods have these characteristics:
• The backup consists of exact copies of database directories and files. Typically this is a copy of all or
part of the MySQL data directory. Data from
MEMORY
tables cannot be backed up this way because
their contents are not stored on disk.
• Physical backup methods are faster than logical because they involve only file copying without
conversion.
• Output is more compact than for logical backup.
• Backup and restore granularity ranges from the level of the entire data directory down to the level of
individual files. This may or may not provide for table-level granularity, depending on storage engine.
(Each
MyISAM
table corresponds uniquely to a set of files, but an
InnoDB
table shares file storage
with other
InnoDB
tables.)
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...