Recover accidentally deleted MySQL database files
am 21.05.2010 17:42:34 von Jose Luis Marin Perez
------=_NextPart_000_003C_01CAF8D2.53DDB5E0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Dear sirs,
Accidentally files in a database have been deleted (/ var/lib/mysql
/"database") when entering the mysql console shows that the database is
created but does not show any table, there is some method to recever the
information in this database?
Centos 4.6
mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
4.3
Thanks
Jose Luis
------=_NextPart_000_003C_01CAF8D2.53DDB5E0--
Re: Recover accidentally deleted MySQL database files
am 21.05.2010 18:24:00 von mos
At 10:42 AM 5/21/2010, you wrote:
>Dear sirs,
>
>
>
>Accidentally files in a database have been deleted (/ var/lib/mysql
>/"database") when entering the mysql console shows that the database is
>created but does not show any table, there is some method to recever the
>information in this database?
>
>
You need to restore your database data directory from backup. You could try
to undelete the files in the data directory but that may not recover all of
the data since the tables may have been open when the files were erased.
Before restoring the files from your backup, make sure you either flush the
tables or shutdown the mysql server.
Mike
>Centos 4.6
>
>mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
>4.3
>
>
>
>Thanks
>
>
>
>Jose Luis
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: Recover accidentally deleted MySQL database files
am 21.05.2010 18:48:26 von Jose Luis Marin Perez
thanks for your answer, it seems these files were deleted when running fsck.
In the /Lost+found directory files are referenced to Mysql for example:
#114470: MySQL table definition file Version 9
#114471: MySQL MISAM compressed data file Version 1
#114472: DBase 3 data file (256 records)
#114473: MySQL table definition file Version 9
#114474: MySQL MISAM compressed data file Version 1
#114475: DBase 3 data file (258 records)
#114476: MySQL table definition file Version 9
#114477: MySQL MISAM compressed data file Version 1
#114478: DBase 3 data file (33489404 records)
#114479: MySQL table definition file Version 9
#114480: MySQL MISAM compressed data file Version 1
#114482: MySQL table definition file Version 9
#114483: MySQL MISAM compressed data file Version 1
#114484: DBase 3 data file (256 records)
#114485: MySQL table definition file Version 9
#114486: MySQL MISAM compressed data file Version 1
#114487: DBase 3 data file (8960 records)
#114488: MySQL table definition file Version 9
#114489: MySQL MISAM compressed data file Version 1
#114490: DBase 3 data file (256 records)
There any way to recover these files in its original location?
Thanks
Jose Luis
-----Mensaje original-----
De: mos [mailto:mos99@fastmail.fm]
Enviado el: Viernes, 21 de Mayo de 2010 11:24 a.m.
Para: mysql@lists.mysql.com
Asunto: Re: Recover accidentally deleted MySQL database files
At 10:42 AM 5/21/2010, you wrote:
>Dear sirs,
>
>
>
>Accidentally files in a database have been deleted (/ var/lib/mysql
>/"database") when entering the mysql console shows that the database is
>created but does not show any table, there is some method to recever the
>information in this database?
>
>
You need to restore your database data directory from backup. You could try
to undelete the files in the data directory but that may not recover all of
the data since the tables may have been open when the files were erased.
Before restoring the files from your backup, make sure you either flush the
tables or shutdown the mysql server.
Mike
>Centos 4.6
>
>mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
>4.3
>
>
>
>Thanks
>
>
>
>Jose Luis
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=jmarin@isp.qnet.com.pe
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Recover accidentally deleted MySQL database files
am 21.05.2010 19:12:12 von Johan De Meersman
--001636b14798cb453d04871dcac4
Content-Type: text/plain; charset=ISO-8859-1
And this is why you have backups :-)
You have little guarantee that the recovered blocks form complete files, but
you can try to move them into the directory (with the correct mdi, myd and
frm extensions and named consistently, of course) and try to figure out what
contains which data from the contents of the tables.
The first challenge, however, is going to be matching the correct .frm file
to the correct .myd and .mdi. I guess you could skip the .mdi files, as
they're just indices, that'll make the job slightly easier at least.
Keep the originally recovered files, too, just in case MySQL tries to write
to some of them and corrupts them.
I hope you enjoy puzzles...
On Fri, May 21, 2010 at 6:48 PM, Jose Luis Marin Perez <
jmarin@isp.qnet.com.pe> wrote:
> thanks for your answer, it seems these files were deleted when running
> fsck.
>
> In the /Lost+found directory files are referenced to Mysql for example:
>
> #114470: MySQL table definition file Version 9
> #114471: MySQL MISAM compressed data file Version 1
> #114472: DBase 3 data file (256 records)
> #114473: MySQL table definition file Version 9
> #114474: MySQL MISAM compressed data file Version 1
> #114475: DBase 3 data file (258 records)
> #114476: MySQL table definition file Version 9
> #114477: MySQL MISAM compressed data file Version 1
> #114478: DBase 3 data file (33489404 records)
> #114479: MySQL table definition file Version 9
> #114480: MySQL MISAM compressed data file Version 1
> #114482: MySQL table definition file Version 9
> #114483: MySQL MISAM compressed data file Version 1
> #114484: DBase 3 data file (256 records)
> #114485: MySQL table definition file Version 9
> #114486: MySQL MISAM compressed data file Version 1
> #114487: DBase 3 data file (8960 records)
> #114488: MySQL table definition file Version 9
> #114489: MySQL MISAM compressed data file Version 1
> #114490: DBase 3 data file (256 records)
>
> There any way to recover these files in its original location?
>
> Thanks
>
> Jose Luis
>
> -----Mensaje original-----
> De: mos [mailto:mos99@fastmail.fm]
> Enviado el: Viernes, 21 de Mayo de 2010 11:24 a.m.
> Para: mysql@lists.mysql.com
> Asunto: Re: Recover accidentally deleted MySQL database files
>
> At 10:42 AM 5/21/2010, you wrote:
> >Dear sirs,
> >
> >
> >
> >Accidentally files in a database have been deleted (/ var/lib/mysql
> >/"database") when entering the mysql console shows that the database is
> >created but does not show any table, there is some method to recever the
> >information in this database?
> >
> >
>
> You need to restore your database data directory from backup. You could try
> to undelete the files in the data directory but that may not recover all of
> the data since the tables may have been open when the files were erased.
>
> Before restoring the files from your backup, make sure you either flush the
> tables or shutdown the mysql server.
>
> Mike
>
>
> >Centos 4.6
> >
> >mysql Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline
> >4.3
> >
> >
> >
> >Thanks
> >
> >
> >
> >Jose Luis
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=jmarin@isp.qnet.com.pe
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>
--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel
--001636b14798cb453d04871dcac4--