LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Synchronisation: Rsync or not? (https://www.linuxquestions.org/questions/programming-9/synchronisation-rsync-or-not-406879/)

C-RAF. 01-23-2006 06:17 AM

Synchronisation: Rsync or not?
 
Hello again,

I was wondering how to synchronise two folders, each of them being on distant machines.

Let say two folders a and b on two computers A and B.
I want that when a user add sumthin' in folder a, this thing is added in b. vice versa
When user delete sumthin' in folder a, this thing is deleted in folder b. vice versa

Some kind of mirroring effect.

T tried to use RSync+ssh with a Script+CronJob

I used Rsync via ssh between two computers but the one where I put the Script lauching the scheduled cron job just "copy" what's in the other. It's like If I was doing a SCP command but I want a "synchronisation", sumthin' working in both ways making both folders identicals.

If u guys got an idea, bless u in advance!

galle 01-23-2006 06:48 AM

I just started looking into the same problem so I hope you get some good answer! So far I've only found an article about unison which looks promising, but I haven't had the time to check it out in detail. I'm not allowed to post links yet, but if you go to linuxjournal com and search for unison synchronization the article is the first hit.

C-RAF. 01-23-2006 07:48 AM

Yessssssss!

This is exactly what I was looking for, this forum is ODH!!!

Quote:

...compared to one-way mirroring options such as rsync...Think of Unison as two-way rsync with a bit of revision control mixed in. The most common use is keeping your local and remote home directory, or some data directory you often use in different contexts, in sync. It uses the rsync algorithm to keep network traffic down and should be tunneled through SSH over untrusted networks. No extra work is needed-simply specify ssh:// when adding a directory location. Quite a bit of extra disk space often is needed for Unison, though, because the synchronizer needs to keep track of what the files looked like on the last run.
Thx a lot Galle, I'll try this ASAP back home. :D


All times are GMT -5. The time now is 07:55 PM.