GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

XtraBackup Error : Got -1 from storage engine

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.


    Regards,

    Viswa.J

  • #2
    Hi,

    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/

    Regards.

    Comment


    • #3
      Miguelangelnieto,

      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`
      InnoDB: in ALTER TABLE ... IMPORT TABLESPACE

      Regards,
      Viswa.J

      Comment


      • #4
        Hi,

        The error log says that you didn't execute the DISCARD on the test_table. Following the manual page linked before you should do the following on the restore process:

        OTHERSERVER|mysql> CREATE TABLE mytable (...) ENGINE=InnoDB;
        OTHERSERVER|mysql> ALTER TABLE mydatabase.mytable DISCARD TABLESPACE;
        After this, copy mytable.ibd and mytable.exp files to database's home, and import its tablespace:
        OTHERSERVER|mysql> ALTER TABLE mydatabase.mytable IMPORT TABLESPACE;

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

        Remember to double check the .ibd and .exp file permission and owner after copying them. Maybe you have wrong owner or group (root).

        I still 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

        Did you try to repeat the process using the manual linked before?

        Regards.

        Comment

        Working...
        X