List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 15 2002 2:33am
Subject:RE: Copying Tables across machines
View as plain text  
At 15:16 -0400 10/14/02, Dennis wrote:
>At 02:51 PM 10/14/2002, you wrote:
>>  > Is there a way to copy a table from one mySQL machine to another without
>>>  implementing replication? The goal is be able to grab a copy of a table
>>>  from some other machine (without regard to master/slave relationships) in
>>>  some programmatic way without having to do a dump, copy file and rebuild.
>>Check out mysqldump.
>>sql, query
>I said I didnt want to do a dump and a copy.
>I guess I wasnt clear. Is there anything in mySQL that will do this? 
>There is a "Load Data from MAster", so there could easily be a "load 
>data from server" also.

What makes you think this would be easy?  I mean, aside from the "it's
always easy when you're not the one who has to implement it" prinicple. :-)

You seem to want what is essentially a replication-like operation, without
setting up replication.

Or a mysqldump-like operation, without using mysqldump.

If your table is a MyISAM table, you can directly copy the table files
with scp or something, but then you have to think about having the server
flush the tables first, to make sure that you're not copying tables that
have some active operation going on them.  Ick.

Maybe mysqlhotcopy would suit your needs. You can run it on the "master"
machine and tell it to use scp to copy the table files to the "slave"
machine.  It'll take care of the flushing and locking for you, to make
sure your copied files aren't inconsistent.
Copying Tables across machinesDennis14 Oct
  • Re: Copying Tables across machinesIikka Meril√§inen14 Oct
RE: Copying Tables across machinesDennis14 Oct
  • RE: Copying Tables across machinesPaul DuBois15 Oct