Rsync on a single server

Matt McCutchen matt at mattmccutchen.net
Tue Apr 27 21:31:20 MDT 2010


On Tue, 2010-04-27 at 19:48 -0700, Legionnaire1 wrote:
> I can only assume everything new/changed was copied as I now need the mysql
> database copied from one domain to the other. Is it possible to copy the
> mysql database using rsync on the /mysql/mydomain to /mysql/myotherdomain or
> do I have to do something different?

You can use rsync if, during the rsync run, you (1) stop the MySQL
server on the destination so it does not get confused by external
changes to its files and (2) run "FLUSH TABLES WITH READ LOCK" on the
source so that rsync reads a consistent state.  You may be better served
by MySQL's own replication features.

-- 
Matt



More information about the rsync mailing list