[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Backup mysql files

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
dimensionav
Asked:
dimensionav
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
dimensionavAuthor Commented:
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
 
DerokorianCommented:
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
 
Eddie ShipmanAll-around developerCommented:
No, No, don't do that, use mysqldump to create your backups, this will recreate your entire DB correctly.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
DerokorianCommented:
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
 
dimensionavAuthor Commented:
Guys, If I could connect the hard drive to another computer running mysql, will be possible to use mysqldump ?

Thanks.
0
 
Eddie ShipmanAll-around developerCommented:
Why can you not run mysqldump on the computer where your DB resides?
0
 
Steve BinkCommented:
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
 
dimensionavAuthor Commented:
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
 
Steve BinkCommented:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now