Sync my website between my host and local server

Matt McCutchen matt at mattmccutchen.net
Tue Aug 28 20:01:47 GMT 2007


On 8/28/07, OOzy Pal <oozypal at gmail.com> wrote:
> I am trying to find a utility that sync my website between the remote
> host and local server. Is this the right tool?

If you want one-way copying (e.g., from local to remote), rsync is the
right tool.  If you want two-way synchronization, I would recommend
Unison ( http://www.cis.upenn.edu/~bcpierce/unison/ ).

> If yes, how can I sync my .php and .html file

Read the man page to learn how to write an rsync command that will
accomplish what you want.  If you have a specific question, you can
ask it.

> including MySQL databasees?

You can copy the MySQL data directory using rsync if you shut down
both MySQL servers first (in order to avoid corruption due to
concurrent database accesses).  If you don't want to shut down the
servers, you can use MySQL's built-in replication features (see
http://dev.mysql.com/doc/refman/5.0/en/replication.html ).

Matt


More information about the rsync mailing list