Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Run rsync based on time difference between local file and server file



I do it for some files with diff over ssh

ssh -i key user@example.com "cat somefile.conf" | diff local-somefile.conf

stat -c %Y somefile gives you the time a file was changed last in
epoch time, so you could compare with that - probably being mailed a
list of the diffs would be easier.

Manageable for a few files perhaps:)

A security tool like tripwire would do half the job - I wonder if
there is anything open source out there that can create a database of
files on a server and then compare them with those on another.

Simon

On 11 November 2011 21:23, Raymond Wan <rwan.kyoto@example.com> wrote:
>
> Hi Bruno,
>
>
> On 2011-11-11 17:49, Bruno Raoult wrote:
>> I don't understand the question... Just run your usual rsync script, it
>> should just work...
>> Time is *not* localtime in Unix/Linux systems, but UTC...
>>
>> Therefore, if your machines are quite correctly time-synced, it will just
>> work...
> ...
>
>
> I am just wondering...
>
> Doesn't rsync work if you want to synchronize files from
> computer A to B?  But it won't work between both A to B and
> B to A?  I think what Chuck is asking is that you need to
> know whether to run rsync on computer A or on computer B.
>
> Also, I think in Chuck's case, he has a central computer and
>  >1 other computers.  So if synchronization is one-way, then
> you need to figure out where to run rsync.  Of course, when
> you push files across, if the target has an extra file from
> an earlier synchronization, --delete will remove it.  But I
> don't think rsync can sync in both directions.
>
> If it can, then I guess I have been running it wrong :-P
> because that is why I moved from rsync to unison [which,
> again, has rsync behind it].
>
> Ray
>
>
> --
> To unsubscribe from this mailing list,
> please see the instructions at http://lists.tlug.jp/list.html
>
> The TLUG mailing list is hosted by the award-winning Internet provider
> ASAHI Net.
> Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/
>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links