| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
BACKUP TABLE Syntax
BACKUP TABLE tbl_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.
Copies to the backup directory the minimum number of table files needed
to restore the table, after flushing any buffered changes to disk. Currently
works only for MyISAM tables.
For MyISAM tables, copies `.frm' (definition) and
`.MYD' (data) files. The index file can be rebuilt from those two files.
Before using this command, please see 5.6.1 Database Backups.
During the backup, a read lock will be held for each table, one at time,
as they are being backed up. If you want to back up several tables as
a snapshot, you must first issue LOCK TABLES to obtain a read
lock for each table in the group.
The command returns a table with the following columns:
| Column | Value |
| Table | Table name |
| Op | Always backup |
| Msg_type | One of status, error, info, or warning |
| Msg_text | The message |
Note that BACKUP TABLE is only available in MySQL
version 3.23.25 and later.