Solved

Backup mysql files

Posted on 2012-04-01
9
507 Views
Last Modified: 2012-06-22
HI

Considering this question: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/Windows_7/Q_27657841.html

I have to reinstall my operating system and I wonder how could I perform a backup of some databases exploring the hard drive directly ?

I used to use the apache from zend server.

Regards.
0
Comment
Question by:dimensionav
  • 3
  • 2
  • 2
  • +1
9 Comments
 

Author Comment

by:dimensionav
ID: 37794071
I forgot to mention that I can access to the computer by command line, is possible to perform a backup of the database by this way?
0
 
LVL 10

Accepted Solution

by:
Derokorian earned 250 total points
ID: 37795762
Well you could change directories to where MySQL is installed. Then look for the data folder, in this folder should be some files and folders matching database names. Inside each of those folders should be files matching names of tables from that database. Copy the entire DATA folder to disk / flash drive / whatever and simply restore the files in the same place on the new installation.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 37797539
No, No, don't do that, use mysqldump to create your backups, this will recreate your entire DB correctly.
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 10

Expert Comment

by:Derokorian
ID: 37797626
Yes mysqldump would be preferred however dimensionav said:
I wonder how could I perform a backup of some databases exploring the hard drive directly.
Therefore using mysqldump while the preferred method for backing up a db, didn't fit into this requirement.
0
 

Author Comment

by:dimensionav
ID: 37797670
Guys, If I could connect the hard drive to another computer running mysql, will be possible to use mysqldump ?

Thanks.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 37798370
Why can you not run mysqldump on the computer where your DB resides?
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 37799082
I've done many "backups" of MySQL databases by using the find-and-copy method.  With ISAM-based tables, this is not a problem.  It has proven safe for me in the past, given that the host service is not running.  Pay attention to that caveat - if the host service is running, the files could be in an inconsistent state.  There is some "proper care" to take with InnoDB tablespaces, especially if the destination server has an existing InnoDB tablespace.  In that case, I would recommend only using a tool such as mysqldump.

mysqldump is a mysql client in itself.  As long as the host service is running, and you can connect to it, you can use mysqldump to obtain an SQL-based backup of every object.  If possible, I recommend using this method.  This does require the host service to be running, though, which may not be an option for you given the phrasing of your request.
0
 

Author Comment

by:dimensionav
ID: 37800767
EddieShipman: Because the driver in which mysql engine resides has the operating system and I cant boot from it.

routinet: My tables are InnoDB actually.
0
 
LVL 50

Assisted Solution

by:Steve Bink
Steve Bink earned 250 total points
ID: 37802928
If you cannot run the host service, and your tables are InnoDB, then I would recommend copying the tablespace files to a new host service.  Make sure it is one with no other databases in it.  Put the files in place, start the new service, then use mysqldump to pull the data you need.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
The viewer will learn how to dynamically set the form action using jQuery.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question