Unix Technical Forum

quickly copying a database

This is a discussion on quickly copying a database within the MySQL General forum forums, part of the MySQL category; --> I've got a server with a database that's about 10G. I need several other copies of this database, with ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:50 AM
Ofer Inbar
 
Posts: n/a
Default quickly copying a database

I've got a server with a database that's about 10G. I need several
other copies of this database, with different names, on the same host
and same MySQL instance.

I could mysqldump the db and then restore it into the others...

mysql> create database one;
mysql> create database two;
...

mysqldump ... > dumpfile.sql
mysql -uroot -p one < dumpfile.sql
mysql -uroot -p two < dumpfile.sql
...

Unfortunately, each restore from a mysqldump takes about an hour (and
if I do more than one at a time, they'd slow down considerable due to
disk I/O contention).

If these DBs were all MyISAM, I could shut down MySQL and just copy
the directories. But it seems that InnoDB tables are stored partly
in /var/lib/mysql/ibdata1 and this database has a mix of MyISAM and
InnoDB.

Is there a better technique to make several database copies quickly,
that works for a mix of MyISAM and InnoDB?
-- Cos
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:52 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com