fastest way to duplicate production server?
Mark Bucciarelli
mark at gaiahost.coop
Wed Jul 13 02:06:26 GMT 2005
On Tue, Jul 12, 2005 at 03:28:32PM -0700, Gustavo A. Baratto wrote:
> - to copy over mysql data, you must do a " FLUSH TABLES WITH READ LOCK"
> then rsync the data directory over to the test server (/var/db/mysql is the
> freebsd default). Then you "UNLOCK TABLES" after rsync is done. Start mysql
> and you are done. Instead of a "flush tables with read lock", you could
> just stop mysql in the production server. This is just to make sure there
> is no updates in the tables while you are copying them over.
You can also use the mysqlhotcopy perl script for this task (assuming ISAM
tables). It is fast.
m
More information about the freebsd-isp
mailing list