Oracle 5.0 Reference Manual page 639

Table of Contents

Advertisement

• In addition to databases, the backup can include any related files such as log or configuration files.
• Backups are portable only to other machines that have identical or similar hardware characteristics.
• Backups can be performed while the MySQL server is not running. If the server is running, it is
necessary to perform appropriate locking so that the server does not change database contents
during the backup.
• Physical backup tools include file system-level commands (such as cp, scp, tar, rsync),
for
mysqlhotcopy
tables.
• For restore, files copied at the file system level or with
their original locations with file system commands;
restores
ndb_restore
Online Versus Offline Backups
Online backups take place while the MySQL server is running so that the database information can be
obtained from the server. Offline backups take place while the server is stopped. This distinction can
also be described as "hot" versus "cold" backups; a "warm" backup is one where the server remains
running but locked against modifying data while you access database files externally.
Online backup methods have these characteristics:
• The backup is less intrusive to other clients, which can connect to the MySQL server during the
backup and may be able to access data depending on what operations they need to perform.
• Care must be taken to impose appropriate locking so that data modifications do not take place that
would compromise backup integrity.
Offline backup methods have these characteristics:
• Clients can be affected adversely because the server is unavailable during backup.
• The backup procedure is simpler because there is no possibility of interference from client activity.
A similar distinction between online and offline applies for recovery operations, and similar
characteristics apply. However, it is more likely that clients will be affected for online recovery than for
online backup because recovery requires stronger locking. During backup, clients might be able to read
data while it is being backed up. Recovery modifies data and does not just read it, so clients must be
prevented from accessing data while it is being restored.
Local Versus Remote Backups
A local backup is performed on the same host where the MySQL server runs, whereas a remote
backup is done from a different host. For some types of backups, the backup can be initiated from a
remote host even if the output is written locally on the server. host.
can connect to local or remote servers. For SQL output
mysqldump
statements), local or remote dumps can be done and generate output on the client. For delimited-text
output (with the
--tab
performs only local backups: It connects to the server to lock it against data
mysqlhotcopy
modifications and then copies local table files.
SELECT ... INTO OUTFILE
is created on the server host.
• Physical backup methods typically are initiated locally on the MySQL server host so that the server
can be taken offline, although the destination for copied files might be remote.
Backup and Recovery Types
tables,
MyISAM
ibbackup
tables.
NDB
[305]
option), data files are created on the server host.
can be initiated from a local or remote client host, but the output file
619
for
tables, or
InnoDB
START BACKUP
mysqlhotcopy
restores
ibbackup
(CREATE
for
NDB
can be copied back to
tables, and
InnoDB
and
INSERT

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents