[CentOS] Two Samba Servers and Rsync

Wed Aug 10 09:05:04 UTC 2011
Cliff Pratt <enkiduonthenet at gmail.com>

On Wed, Aug 10, 2011 at 1:05 PM, Les Mikesell <lesmikesell at gmail.com> wrote:
> On 8/9/11 7:37 PM, Cliff Pratt wrote:
>> On Wed, Aug 10, 2011 at 8:05 AM, Les Mikesell<lesmikesell at 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.
>
Well, up to a point I'd agree with you. However, I can't going to my
boss and asking for more RAM to get rsync to work on top of what was
specced for the app, he'd probably walk away muttering things like
"Windows"....

My point was however not to diss a really good utility but to give
some hints and tips. I started to use rsync when I had the need and
everyone told me how good it was. And it is. But it does have its
little quirks.
>
>> I've also had it fail silently to copy files.
>
> That's odd, unless it actually was killed by the OOM killer.
>
You are likely correct, but I didn't have time (at the time) to
investigate further.
>
>> 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.
>
Yes, indeed.

Cheers,

Cliff