473,465 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

recover a database just from the filesystem.

I've got a disk that had the data files for my mysql server on it.
From these files can I rebuild the database? I didn't do backups or
anything like that, but I have the whole file system. What I was
looking to do was reinstall mysql and then somehow import those files
to recreate the database, is this possible?

Thanks,

Fenton
Jul 20 '05 #1
4 4166
anonymous wrote:
I've got a disk that had the data files for my mysql server on it.
From these files can I rebuild the database? I didn't do backups or
anything like that, but I have the whole file system. What I was
looking to do was reinstall mysql and then somehow import those files
to recreate the database, is this possible?

Thanks,

Fenton


You can just copy the files into the new data store folder then make
sure you run a repair on all tables. Also remember to chown and chgrp
the files and folders to mysql (chown -R mysql.mysql *) for *nix systems.

I have done this many times as a quick way of transfering large amounts
of data between servers.

Hope this helps

Peter.
Jul 20 '05 #2
anonymous wrote:
I've got a disk that had the data files for my mysql server on it.
From these files can I rebuild the database? I didn't do backups or
anything like that, but I have the whole file system. What I was
looking to do was reinstall mysql and then somehow import those files
to recreate the database, is this possible?

Thanks,

Fenton

You can just copy the files into the new data store folder then make
sure you run a repair on all tables. Also remember to chown and chgrp
the files and folders to mysql (chown -R mysql.mysql *) for *nix systems.

I have done this many times as a quick way of transfering large amounts
of data between servers.

Hope this helps

Peter.
Jul 20 '05 #3
"Peter King" wrote:
anonymous wrote:
I’ve got a disk that had the data files for my mysql server on it.
From these files can I rebuild the database? I didn’t do

backups or
anything like that, but I have the whole file system. What I was
looking to do was reinstall mysql and then somehow import those

files
to recreate the database, is this possible?

Thanks,

Fenton

You can just copy the files into the new data store folder then

make sure you run a repair on all tables. Also remember to chown and chgrp the files and folders to mysql (chown -R mysql.mysql *) for *nix
systems.

I have done this many times as a quick way of transfering large
amounts
of data between servers.

Hope this helps

Peter.


Peter’s solution works in your case, since no other backups exist.

For others reading this post and wanting to copy the file system for
regular backups, I have heard that you cannot recover the files 100%
of the times, so this approach is not to be relied on for regular
backups. Comments?

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-recove...ict135682.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=454900
Jul 20 '05 #4
"anonymous" <fe************@yahoo.com> skrev i en meddelelse
news:47**************************@posting.google.c om...
I've got a disk that had the data files for my mysql server on it.
From these files can I rebuild the database? I didn't do backups or
anything like that, but I have the whole file system. What I was
looking to do was reinstall mysql and then somehow import those files
to recreate the database, is this possible?


Assume the architecture is the same (eg you didn't upgrade from windows to
*nix or to another cpu family (eg i386 to alpha)), and the mysql version is
the same, you simply install mysql, stop it, drop the datafiles in the data
directory, start mysql, and it is running the backup'ed databases.

Leif

PS: Even if you changed os or cpu family, the backups might work anyway,
I'm, sure which platforms are binary compatible.
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Snake Djip | last post by:
Hi, I have a database table which I wanted to backup. Stupid me, I only backed up the MYD and MYI file. I do not have the FRM file anymore. Is there a way to recover this data ?
4
by: anonymous | last post by:
I've got a disk that had the data files for my mysql server on it. From these files can I rebuild the database? I didn't do backups or anything like that, but I have the whole file system. What I...
1
by: L. Bertolini | last post by:
We're considering purchasing an application, which stores some data in the filesystem, and some data (meta data and links to files) in MS-SQL. We need to be able to create a backup wherein the...
5
by: Prem K Mehrotra | last post by:
I come from Oracle background. In Oracle, when one wants to do a point in time recovery, one can specify recover database until timestmap. Oracle's database maps to a db2 subsystem, i.e., in...
2
by: Dennis Breithaupt | last post by:
Hy all, I request your support for the following problem. (with "postmaster (PostgreSQL) 7.4.1") On a development-system I lost the pg_xlog-directory due to a system crash, where the physical...
2
by: JeanGreyRedd | last post by:
Hi! Just recently OS (Windows 2003 Server) of our server crashed and needed to be re-installed. Unfortunately, we we not able to create a backup of the databases using the ENTERPRISE MANAGER. ...
0
by: sunildutt | last post by:
Hi all, I had few databases created in DB2 9.1 with huge data/users. Unknowingly those database was Removed(Not Dropped). Is it possible to recover the databases as i have not taken any backup.
1
by: Adrian20XX | last post by:
Hi, I have a C program I'm optimizing, and I would like to hear any idea about what is more important in here. The program is very simple, I have a huge table of long integers (123MB aprox, on...
1
by: marcf | last post by:
Ello everyone, Ok i've just upsized the database to SQL Server 2005, here is the code: Set con = Application.CurrentProject.Connection Set rs = New ADODB.Recordset rs.CursorType =...
1
by: Russel0725 | last post by:
One of our biggest database is on Suspect Mode. We searched the net for steps to recover and it is now on Emergency Mode. During transfer of data from old database to new database, we encounter...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.