On 8/9/11 7:37 PM, Cliff Pratt wrote:
On Wed, Aug 10, 2011 at 8:05 AM, Les Mikeselllesmikesell@gmail.com wrote:
On 8/9/2011 2:50 PM, Railic Njegos wrote:
Hi all, I plan to implement two file servers on CentOS 6 i a two remote location. i need to backup all data from second server on first. First server will be a virtual machine on Esxi, and second server will be physical machine.
I plan to use rsync to sync data from second to first server. It is OK ? Any suggestion ?
Rsync is probably the best thing you will find for this. As long as whatever you are doing can tolerate the possible differences between rsync runs it should be fine. Rysnc normally creates a new file under a tmp name, renaming only when the transfer is complete so programs accessing the data will only see one version or the other, not an inconsistent copy as the transfer progresses.
rsync has its own issues. I still use it, but I've learned not to trust it completely. If you have a deep directory hierarchy and lots of files, it may run out of memory and crash.
I'm not sure I'd blame rsync if you don't have enough RAM... But the 3.x versions are probably better about that.
I've also had it fail silently to copy files.
That's odd, unless it actually was killed by the OOM killer.
In the past I've written wrapper scripts that break down the rsync into several 'chunks', and check the number of files on source and target servers at the end. Some people run rsync and then immediately run it again!
Running twice is a reasonable thing - maybe even running until no files are changing.