Rsync on a single server

Henri Shustak henri.shustak at gmail.com
Wed Apr 28 17:29:12 MDT 2010


>> I seem to have been successful in copying files from one of the domains to
>> the other using the following:
>> rsync -auvn /path/to/source/directory /path/to/destination/directory
>> 
>> 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.


There are a number of ways to use rsync to perform backups.

Will you be regularly backing up these directories and databases or is this just a one one of thing?

Would you mind clarifying your intended use of this backup? For example : 
  - In the event that an important file is accidentally 
    deleted, we are planning to restore this file from
    the backup.
  - Should the physical machine catch on fire, we want
    to be able to have a second machine ready to take 
    over right away.

Finally, do you have a backup policy to guide you with this project?


---------------------------------------------------------------------
This email is protected by LBackup, an open source backup solution.
http://www.lbackup.org




More information about the rsync mailing list