XtraBackup Error : Got -1 from storage engine

We are trying to implement Copying InnoDB table between servers using Xtrabackup, but we are unable to take the backup and run in another server.

We are getting the following error, Got -1 from storage engine.

But for the above error, while exporting we have enabled the following options innodb-expand-import and innodb-file-per-table.

After doing the above, still we are unable to load the .ibd files and getting the same error.

We have followed the steps from this url,

http://www.mysqlperformanceblog.com/2009/07/31/copying-innod b-tables-between-servers/

Also, we have discard and try to import the tablespace, but it also fails.

Past one week we tried to solve this, but we are unable to sort this.

Please help out on this.




In order to move InnoDB table from one server to another using XtraBackup you need to have Percona Server as the destination server, it doesn’t work with Oracle’s MySQL. I recommend you to check the following link, it has more updated information than the linked blog post.

http://www.percona.com/doc/percona-xtrabackup/innobackupex/i mporting_exporting_tables_ibk.html

Please, follow those steps and tell us in which step are you having problems. A full log output would also be helpful.

We also need to know:

  • MySQL version of the origin server (is it Percona Server?)
  • MySQL version of the destination server (is it Percona Server?)
  • XtraBackup version
  • Output of the error log regarding the restore process

If you are trying to restore a single InnoDB table on a Oracle’s MySQL server you should follow this steps:

http://www.mysqlperformanceblog.com/2012/01/25/how-to-recove r-a-single-innodb-table-from-a-full-backup/



Thanks for the help,

Getting the following error, while importing the innodb table data

InnoDB: of table test.test_table.
120313 7:59:04 InnoDB: Error: you are trying to IMPORT a tablespace
InnoDB: test.test_table, though you have not called DISCARD on it yet
InnoDB: during the lifetime of the mysqld process!
120313 7:59:50 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
120313 7:59:50 InnoDB: Error: trying to open a table, but could not
InnoDB: open the tablespace file ‘./test/test_table.ibd’!
120313 7:59:50 InnoDB: Error: cannot reset lsn’s in table test.test_table