RE: quickly copying a database

2007-07-18 Thread Rhys Campbell
InnoDB HotBackup but it costs money.

http://www.innodb.com/hot-backup

-Original Message-
From: Ofer Inbar [mailto:[EMAIL PROTECTED]
Sent: 18 July 2007 00:12
To: mysql@lists.mysql.com
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
InnoDB.

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: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

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 [EMAIL PROTECTED] 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


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



quickly copying a database

2007-07-17 Thread Ofer Inbar
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

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]