Hi!

My experience with MySQL is based on Windoze, but I cannot think of any obvious reason why Linux should be different. After making a regular backup (as backup backup) I often only copy the data directory, then install MySQL on a different box and replace the empty MySQL data directory with the one I copied. That not only brings the databases and tables over without problems, but also the MySQL user accounts and their privileges (afaik a plain backup does not do that). The only thing I need to do is recreate the scheduled backup task. The new MySQL install has no idea that the databases moved at some point. That worked for me every single time so far. My databases are very simple with a handful of tables, no sprocs or stuff like that. I can't see why that could make a difference, but since I haven't tried it I cannot tell you anything about it. Just make sure that you don't copy the application files over. Been there, done that, MySQL doesn't like it - not that I can blame it for that. And the typical disclaimer: YMMV.


The other David


David A. Roth wrote:
I know this sounds silly, but a Linux backup was done without the MySQL files being dumped. My task, if I choose to accept it (Mission Impossible theme music playing) :-) is to retrieve the files which contain the MySQL database from the Linux backup and restore them into another Linux system so that the database and tables can once again be accessed by the application that uses them. When the backup was performed no transactions were being performed to the MySQL database at the time.

How should I proceed to do this safely? Can I merely copy these files to a fresh Linux install with MySQL and be fine, or should something else be done? Which files and directories should and shouldn't be copied that pertain to restoring this MySQL database and tables?

Thanks!

David

_______________________________________________
New York PHP Community MySQL SIG
http://lists.nyphp.org/mailman/listinfo/mysql

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to