I am using Percona-Server 8.0.x and I am following percona xtraback documentation.
I am exporting all tables in one or more databases from a single server. I am trying to restore them on a different server by using discard and import tablespace query. However the import works for some tables but not for many others. It fails exactly on particular type of data column type.
- Use xtraback to export the selected databases.
- Prepare the backup
- On the destination server, discard tablespace
ALTER TABLE db.table_name DISCARD TABLESPACE
@@datadir/database/with proper permission
- Import the table space.
ALTER TABLE db.table_name IMPORT TABLESPACE
Error I am getting is following.
Schema mismatch (Column <colname> precise type mismatch.)
Here in all the failures I am facing are related to
LONGTEXT datatype. The original schema were created in MySQL 5.5. era. Also I am running percona-server with non strict SQL mode
Upon further investigation,
The tablespace export and import works if it is performed using MySQL commands. However it gives problem when use the
.cfg generated via percona xtraback tool. I will post if I get it to work.