List:General Discussion« Previous MessageNext Message »
From:Rhys Campbell Date:July 18 2007 1:19pm
Subject:RE: quickly copying a database
View as plain text  
InnoDB HotBackup but it costs money.

-----Original Message-----
From: Ofer Inbar [mailto:cos@stripped]
Sent: 18 July 2007 00:12
To: mysql@stripped
Subject: 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

Is there a better technique to make several database copies quickly,
that works for a mix of MyISAM and InnoDB?
  -- Cos

MySQL General Mailing List
For list archives:
To unsubscribe:

This email is confidential and may also be privileged. If you are not the intended
recipient please notify us immediately by telephoning +44 (0)20 7452 5300 or email
postmaster@stripped. You should not copy it or use it for any purpose nor disclose
its contents to any other person. Touch Local cannot accept liability for statements made
which are clearly the sender's own and are not made on behalf of the firm.

Touch Local Limited
Registered Number: 2885607
VAT Number: GB896112114
Cardinal Tower, 12 Farringdon Road, London EC1M 3NN
+44 (0)20 7452 5300

quickly copying a databaseOfer Inbar18 Jul
RE: quickly copying a databaseRhys Campbell18 Jul