All pages
Powered by GitBook
1 of 1

Loading...

FLUSH TABLES FOR EXPORT

Prepare individual tables for binary backup. This command flushes changes to disk and locks tables, allowing safe copying of .ibd files while the server runs.

Syntax

Description

FLUSH TABLES ... FOR EXPORT flushes changes to the specified tables to disk so that binary copies can be made while the server is still running. This works for , , , , and tables.

The table is read locked until you issue .

If a storage engine does not support FLUSH TABLES FOR EXPORT, a 1031 error ( 'HY000') is produced.

If FLUSH TABLES ... FOR EXPORT is in effect in the session, the following statements will produce an error if attempted:

  • FLUSH TABLES WITH READ LOCK

  • FLUSH TABLES ... WITH READ LOCK

  • FLUSH TABLES ... FOR EXPORT

If any of the following statements is in effect in the session, attempting FLUSH TABLES ... FOR EXPORT will produce an error.

  • FLUSH TABLES ... WITH READ LOCK

  • FLUSH TABLES ... FOR EXPORT

  • LOCK TABLES ... READ

FLUSH FOR EXPORT is not written to the .

This statement requires the and the privileges.

If one of the specified tables cannot be locked, none of the tables will be locked.

If a table does not exist, an error like the following will be produced:

If a table is a view, an error like the following will be produced:

Example

For a full description, please see .

See Also

  • - Compressing the MyISAM data file for easier distribution.

This page is licensed: CC BY-SA / Gnu FDL

FLUSH TABLE[S] table_name [, table_name] FOR EXPORT
Any statement trying to update any table
LOCK TABLES ... WRITE

aria_pack - Compressing the Aria data file for easier distribution

Archive
Aria
CSV
InnoDB
MyISAM
MERGE
UNLOCK TABLES
SQLSTATE
binary log
RELOAD
LOCK TABLES
copying MariaDB tables
FLUSH TABLES
Copying Tables Between Different MariaDB Databases and MariaDB Servers
Copying Transportable InnoDB Tablespaces
myisampack
ERROR 1146 (42S02): Table 'test.xxx' doesn't exist
ERROR 1347 (HY000): 'test.v' is not BASE TABLE
FLUSH TABLES test.t1 FOR EXPORT;
#  Copy files related to the table (see below)
UNLOCK TABLES;