include table definition information (CREATE TABLE) for exported tables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Invalid
|
Undecided
|
Unassigned |
Bug Description
It is possible to export/import tables, or to recover only a subset of tables using Xtrabackup. In order to use a table which has been exported by Xtrabackup, ALTER TABLE {DISCARD|IMPORT} TABLESPACE is required, which requires an empty table definition.
In a disaster recovery situation (such as a dropped table), the original CREATE TABLE statement may not be available.
I suggest that during the backup phase when .frm files are copied, to also collect CREATE TABLE statements for the tables that are being backed up, and write them out to a single metadata file (xtrabackup_
The metadata file can then be used to restore the table definition before calling ALTER TABLE ... TABLESPACE.
--Justin
Converted to https:/ /blueprints. launchpad. net/percona- xtrabackup/ +spec/create- table-for- exported- tables