1

I'm using Xtrabackup to perform a MySQL DB restore.

I found some problems when I'm trying to restore individual tables: tables with InnoDB engine can be restored without any problem but I can't find a way to backup and restore MyISAM tables. Is there a way to restore MyISAM individual tables with Xtrabackup or similar products?

6
  • xtrabackup copies MyISAM tables as well. How do you run xtrabackup?
    – akuzminsky
    Aug 8, 2017 at 8:40
  • with this command: innobackupex --apply-log --export /path/to/backup
    – Dandelion
    Aug 8, 2017 at 8:44
  • I meant how do you take backups. Anyways, are there *.MYD, *MYI files in the backup?
    – akuzminsky
    Aug 8, 2017 at 8:47
  • Yes, both *.MYD and *.MYI file are present in the backup directory.
    – Dandelion
    Aug 8, 2017 at 9:08
  • 1
    To restore individual MyISAM tables you can copy table.{frm,MYD,MYI} files , execute FLUSH TABLES (yes, mysqld may be running) and the restored version will be available on MySQL instance.
    – akuzminsky
    Aug 8, 2017 at 9:12

1 Answer 1

1

To restore individual MyISAM tables from XtraBackup:

  • Copy table.{frm,MYD,MYI} files to MySQL database directory e.g /var/lib/mysql/sakila
  • Execute FLUSH TABLES (yes, mysqld may be running)
  • Check the restored version is available on MySQL instance with SHOW TABLES and selecting rows from them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.