:: DEVELOPER ZONE
BACKUP TABLEtbl_name[,tbl_name] ... TO '/path/to/backup/directory'
Note: This statement is deprecated. We are working on a better replacement for it that will provide online backup capabilities. In the meantime, the mysqlhotcopy script can be used instead.
BACKUP TABLE copies to the backup directory the
minimum number of table files needed to restore the table, after
flushing any buffered changes to disk. The statement works only for
MyISAM tables. It copies the
.frm definition and .MYD
data files. The .MYI index file can be rebuilt
from those two files. The directory should be specified as a full
pathname.
Before using this statement, please see Section 5.8.1, “Database Backups”.
During the backup, a read lock is held for each table, one at time,
as they are being backed up. If you want to back up several tables
as a snapshot (preventing any of them from being changed during the
backup operation), you must first issue a LOCK
TABLES statement to obtain a read lock for every table in
the group.
The statement returns a table with the following columns:
| Column | Value |
Table
|
The table name |
Op
|
Always backup
|
Msg_type
|
One of status, error,
info, or warning
|
Msg_text
|
The message |
BACKUP TABLE is available in MySQL 3.23.25 and
later.
© 1995-2005 MySQL AB. All rights reserved.

User Comments
Warning: query failed: Unknown column 'user.firstname' in 'field list' in /data0/sites/live/web-main/lib/mysql-cxn.php on line 69
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /data0/sites/live/web-main/lib/docbook.php on line 245
Add your own comment.