about lock.

Phil Howard phil-rsync-2 at ipal.net
Thu Mar 8 13:03:37 GMT 2007

On Thu, Mar 08, 2007 at 12:08:55PM +0100, Alejandro Feij?o wrote:

| mmm and is posible corrupt data???
| for example if rsync is on file called A.txt and at same time mysql is read
| A.txt... whats happend? is that who i dont understand.

It can get mixed data.  The file contents could appear corrupt to another
mysql running on the target.  You can use rsync to backup database files
while mysql is running to get _MOST_ of the content transferred while the
database is running.  Repeat rsync until very little change happens in a
shorter run.  Then shut down mysql cleanly and do a final rsync to sync
the files in a non-corrupt way.  At least mysql downtime is minimal this

You may also want to employ methods of backup up data from within mysql
itself on a row/column basis as transactions update things, to a live
backup mysql engine running elsewhere that can take over serving clients
should the first die.  This has the advantage of a hot failover AND you
could use that backup engine to do the rsync backups from, since only it
needs to be shutdown to do the final rsync syncronization.  Just be sure
the in-mysql backups know how to re-syncronize everything that was changed
while the backup mysql was briefly down for the last rsync run.

                           /--> rsync copy to site 2
main mysql ==> backup mysql --> rsync copy to site 3
                           \--> rsync copy to site 4

| Phil Howard KA9WGN (ka9wgn.ham.org)  /  Do not send to the address below |
| first name lower case at ipal.net   /  spamtrap-2007-03-08-0703 at ipal.net |

More information about the rsync mailing list