Dan Nelson <dnel...@allantgroup.com> writes:

> In the last episode (Jun 02), Jesse F. Hughes said:
>> After a recent hard drive kerfluffle and the results of fsck, I'm left
>> with a slew of jumbled database files.  The file command can tell me the
>> file types, like so:
>> 
>> #15901614: MySQL table definition file Version 10
>> #15901615: MySQL MISAM compressed data file Version 1
>> #15901617: MySQL table definition file Version 10
>> #15901618: MySQL MISAM compressed data file Version 1
>> #15901620: MySQL table definition file Version 10
>> #15901621: MySQL MISAM compressed data file Version 1
>> 
>> These files are, I'm pretty sure, from my mythtv database.  I'm
>> rebuilding my box and it would be nice if I can keep the mythtv
>> database the same as before, but how can I tell which file is which?
>
> "table definition" files are the .frm files; "MISAM compressed data" files
> are .MYI files.  Unfortunately, you're missing the .MYD files in that list,
> which don't have a header (sometimes 'file' thinks they're dbase format).
>
> You may be in luck, though.  The filenames are the inode numbers of the
> original files, and it looks like they're in sequential order, so the tables
> were probably created all at once, one after the other.  File #15901616 (if
> it exists) is probably the .MYD file that corresponds to #15901614 (.frm)
> and #15901615 (.MYI).
>
> The numerical order of the files should match the order the mythtv setup
> script creates its tables.  If they aren't in order for some reason, then
> you can rename the groups of files into "a.frm", "a.MYI", "a.MYD", "b.frm",
> "b.MYI", "b.MYD", etc, then run "show create table a" etc to determine the
> table layout and match them up to known mythtv tables.

Ouch.  I've found the time to look into the problem a little more
closely.

I do have a lot of DBase3 files listed, with varying number of
records.  Unfortunately, they *aren't* in sequential order with the
.MYI and .frm files.  I probably used a MySQL dump file to create
them, so I suppose that the previous files were unlinked and new ones
created.

Except that the dbase files I see have *lower* inode numbers than the
.MYIs and .frms!

Is there some way to match the .MYI to its corresponding .MYD?  I have
only 33 to 47 .MYD files (judging from the output of file and their
contiguity), but 74 .MYI files.

Thanks.
-- 
Jesse F. Hughes

"This post marks the end of an era in the world of mathematics."
                  -- James S. Harris and the demise of Galois theory

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to