After working with innobackupex I’ve become familiar with what it takes to do backups and restores. But I have a question about restoring a single database from a full backup. According to the docs, here is the procedure:
- Apply the log to the backup with the --export option to create the .exp (for Percona) and .cfg (for Community) InnoDB tables.
- Drop the target database and recreate its DDL only using the DDL that was in existence when the backup was taken (we create this DDL script programmatically during the backup process).
- Discard the tablespaces for the InnoDB tables in the target database.
4. Copy the .ibd and .exp files from the backup to the target folder (as stated here: [URL=“Restoring Individual Tables”]https://www.percona.com/doc/percona-...ables_ibk.html[/URL]) - Import the tablespaces for the InnoDB tables.
[COLOR=#FF0000]My question is about #4 above. First of all, if we only copied the .ibd and .exp files that would miss all the MYISAM tables if any existed. Second, why not just copy EVERYTHING from the backup folder (for that database) to the target database folder instead? That would make the restore a lot simpler. I’ve tried this and it seems to work fine. Here are the file types in the backup folder:
.exp (for restoring to Percona XtraDB Servers)
.cfg (for restoring to Community Servers)
.ibd (InnoDB table)
db.opt (the database options file)
.frm (table format file)
.MYD (MYISAM table)
.MYI (MYISAM index)