View Single Post
  #9 (permalink)  
Old December 17th, 2003, 04:53 PM
nikolai nikolai is offline
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another tip: You can use mysqldump to dump the contents of one database directly into another, even if the databases are located on different hosts:

mysqldump -uuser -ppass -hhostname -q database | mysqldump -uuser -ppass -hhostname database


The -q option to mysqldump means that it doesn't buffer the output until it's all done to display it. Without that flag, mysqldump will create a huge string containing all the dump strings, and then output that string all at once.

With large dumps, it's much quicker to just dump output as it's generated, instead of buffering it all. That way, mysql can start creating the other database as it recieves dump output, instead of waiting for mysqldump to completely finish first.



Take care,

Nik
http://www.bigaction.org/
Reply With Quote