What's new
Carbonite

South Africa's Top Online Tech Classifieds!
Register a free account today to become a member! (No Under 18's)
Home of C.U.D.

Rebuild a MySQL DB From ONLY the IDB Files????

SantaMuerte

VIP
VIP Supporter
Rating - 100%
185   0   0
Joined
Dec 19, 2010
Messages
9,754
Reaction score
2,029
Points
19,165
Howdy gents

Anyone here that knows a 100% working solution to rebuild a MySQL database using only the IDB files from a backup?

The database tables got dropped and all I have left in the MySQL data directory is the IDB files for each table.

I have tried a magnitude of solutions from the web and none of them worked. The furthest I got was an error when importing the tablespaces. "Incorrect key file for table 'tablename'; try to repair it "

Anyone that can assist me with rebuilding my db? :) Would be much appreciated
 
Yo, have used this successfully in the past..

1. Copy existing IBD files to safe place.
2. Recreate the dropped tables.
- Use mysqlfrm --diagnostic <path_to_table_frm_file> to get the table structures if you don't know them.
3. DISCARD Current table space of newly created tables.
4. Copy the backed up IBD files from safe place to datadir
5. Import tablespace of tables using the old IBD files.

Use at own risk.

If you're on a *NIX environment - have a look at xtrabackup for setting up data recovery.

Cheers,
Agmad
 
Yo, have used this successfully in the past..

1. Copy existing IBD files to safe place.
2. Recreate the dropped tables.
- Use mysqlfrm --diagnostic <path_to_table_frm_file> to get the table structures if you don't know them.
3. DISCARD Current table space of newly created tables.
4. Copy the backed up IBD files from safe place to datadir
5. Import tablespace of tables using the old IBD files.

Use at own risk.

If you're on a *NIX environment - have a look at xtrabackup for setting up data recovery.

Cheers,
Agmad
Hey man

There is no FRM files, which is one of the problems.

It was a Wordpress site with over two months' work that went into it so I was not keen on rebuilding the site, but due to time constraints I ended up rebuilding it anyway. Google had the pages cached so I could work from the cached versions and get it done in two days.
 

Users who are viewing this thread

Back
Top Bottom