From owner-freebsd-isp@FreeBSD.ORG Wed Jul 13 02:06:26 2005 Return-Path: X-Original-To: freebsd-isp@freebsd.org Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C27E116A41C for ; Wed, 13 Jul 2005 02:06:26 +0000 (GMT) (envelope-from mark@gaiahost.coop) Received: from biodiesel.gaiahost.coop (biodiesel.gaiahost.coop [64.95.78.120]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A29443D48 for ; Wed, 13 Jul 2005 02:06:25 +0000 (GMT) (envelope-from mark@gaiahost.coop) Received: from pooh.hubcapconsulting.com ([::ffff:216.153.147.194]) (AUTH: LOGIN mark@hubcapconsulting.com) by biodiesel.gaiahost.coop with esmtp; Tue, 12 Jul 2005 22:06:24 -0400 id 005C4096.42D47720.00000367 Received: by pooh.hubcapconsulting.com (sSMTP sendmail emulation); Tue, 12 Jul 2005 22:06:12 -0400 From: "Mark Bucciarelli" Date: Tue, 12 Jul 2005 22:06:12 -0400 To: freebsd-isp@freebsd.org Message-ID: <20050713020612.GA4921@pooh.hubcapconsulting.com> Mail-Followup-To: freebsd-isp@freebsd.org References: <20050712214555.42683.qmail@web53902.mail.yahoo.com> <018801c58731$0929f8a0$0aae5218@garrincha> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <018801c58731$0929f8a0$0aae5218@garrincha> User-Agent: Mutt/1.5.9i Subject: Re: fastest way to duplicate production server? X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2005 02:06:26 -0000 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