473,379 Members | 1,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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 4161
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.