Tables MySQL Enterprise Backup Copying Data Files (Cold Backup Method) Note The MySQL Enterprise Backup product lets you back up a running MySQL database with minimal disruption to operations while producing a consistent snapshot of the database. When MySQL Enterprise Backup is copying tables, reads and writes can continue. In addition, MySQL Enterprise Backup can create compressed backup files, and back up subsets of tables. In conjunction with the MySQL binary log, you can perform point-in-time recovery. MySQL Enterprise Backup is included as part of the MySQL Enterprise subscription. For more details about MySQL Enterprise Backup, see Section 30.2, “MySQL Enterprise Backup Overview” . You can move an  InnoDB  database simply by copying all the relevant files listed under "Cold Backups" in Section 15.18.1, “InnoDB Backup” . InnoDB  data and log files are binary-compatible on all platforms having the same floating-point number format. If the floating-point formats differ but you have not used  FLOAT  or  DOUBLE  data types in your tables, then the procedure is the same: simply copy the relevant files. When you move or copy file-per-table  .ibd  files, the database directory name must be the same on the source and destination systems. The table definition stored in the  InnoDB  shared tablespace includes the database name. The transaction IDs and log sequence numbers stored in the tablespace files also differ between databases. To move an  .ibd  file and the associated table from one database to another, use a  RENAME TABLE statement: If you have a “clean”  backup of an  .ibd  file, you can restore it to the MySQL installation from which it originated as follows: RENAME TABLE  db1.tbl_name  TO  db2.tbl_name ; 1. The table must not have been dropped or truncated since you copied the  .ibd  file, because doing so changes the table ID stored inside the tablespace. 2. Issue this  ALTER TABLE  statement to delete the current  .ibd  file: 3. Copy the backup  .ibd  file to the proper database directory. 4. Issue this  ALTER TABLE  statement to tell  InnoDB  to use the new  .ibd  file for the table: ALTER TABLE  tbl_name  DISCARD TABLESPACE; ALTER TABLE  tbl_name  IMPORT TABLESPACE; The  ALTER TABLE ... IMPORT TABLESPACE  feature does not enforce foreign key constraints on imported data. In this context, a “clean” .ibd  file backup is one for which the following requirements are satisfied: •There are no uncommitted modifications by transactions in the  .ibd  file. •There are no unmerged insert buffer entries in the  .ibd  file. •Purge has removed all delete-marked index records from the  .ibd  file. 3028