Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need a way to synchronize files between 3 places, all of which can be modified.

All places are on Linux, and the synchronization tool has to run from cronjob - not manually!.

I tried unison, but I can't make it to work with 3 separate places (I tried configuring by using a<=>b and b<=>c synchronizations, but it doesn't work).

Is there any tool that could do something like this?

share|improve this question
    
Why doesn't the unison approach work? Have you considered using a version control system for this? –  pjc50 Dec 3 '09 at 11:39
    
You want a change in one place to end up on the other two? –  innaM Dec 3 '09 at 12:32
    
@Manni: yes - it should work in all directions. –  user7385 Dec 3 '09 at 13:36
    
Because you're already using unison I think a plain rsync is not what you want? –  cringe Dec 3 '09 at 14:10
    
@Carsten: I am not aware of a way to setup rsync so that it will make 3-way synchronization. –  user7385 Dec 3 '09 at 14:34
add comment

7 Answers 7

Have you tried Dropbox for Linux?

share|improve this answer
    
I thought that dropbox required user to "do something" to synchronize. On the other hand - I need it to be done automatically. And the amounts of data (~100GB) that I need to be synchronized look like a bad match with dropbox. –  user7385 Dec 3 '09 at 14:31
    
No action required, but for 100GB it's probably not the right tool –  user12889 Dec 3 '09 at 22:57
1  
If the majority of files remain unchanged, there is not much problem as Dropbox sends only the file's differences between computers (not to mention that has a LAN-only feature to sync them really fast if they are in same LAN). But the real problem is that for 100GB of data it also means that you will have to pay $19.99/month... –  Saxtus Dec 3 '09 at 23:16
add comment

An unorthodox idea, couldn't you just use GIT?

share|improve this answer
    
I think I could, but I don't know it (yet), and I'm not feeling comfortable with learning git on important data. –  user7385 Dec 3 '09 at 12:21
    
Since you seem to have huge amount of data, GIT won't work either. –  Jimmy Hedman Dec 3 '09 at 21:38
    
Well, I would feel even more comfortable with Git (compared to other solutions) because you cannot possibly ever loose data. Also, Git really does not have problems with huge amount of data. Though, you have the problem that it will keep some redundant data, i.e. at least of the size of the data itself (you can delete data from the history, so also not much more than that). –  Albert Jul 6 '10 at 15:23
add comment

NFS or Samba, no cron jobs required.

share|improve this answer
    
Neither of these work well in scenarios with not-so-good connectivity. –  user7385 Dec 13 '09 at 16:29
add comment

Unison will do this. Inside the Unison folder that stores sync data (osx path:~/Library/Application Support/Unison), create two .prf files.

example1.prf

# Unison preferences file

root =  /Users/XXXX/Desktop/a 

root = /Users/XXXX/Desktop/b

perms = 0

#confirmbigdel = false

example2.prf

# Unison preferences file

root =  /Users/XXXX/Desktop/b 

root = /Users/XXXX/Desktop/c

perms = 0

#confirmbigdel = false

now run "unison example1" and "unison example2", all folders will sync.

You can take this a step further and have all folders update as soon as a file changes if you build unison from the latest svn. With the latest svn, you can use the flag "-repeat watch" (eg. "unison exampleX -repeat watch") to watch folders for changes, given the fsmonitor.py file is in the same bin directory that you are executing Unison from.

This also works over ssh if the same version is installed on all machines... A private dropbox, basically. It would probably be a benefit to have a server set up, always connected to the internet to accept changes at any time, all computers would connect to that one looking for changes.

share|improve this answer
add comment

How about Subversion, using a free service like projectlocker or cvsdude? It's very easily scalable.

share|improve this answer
    
subversion keeps 2nd copy of data in .svn directory. which in case of 100GB of base data is far from practical –  user7385 Dec 3 '09 at 17:30
add comment

Does the data change at all places all the time? Otherwise you could start your work by doing a rsync from one (that you declare as the master) to the machine you work and then rsync back when you are done.

share|improve this answer
    
Yes. I have no control about what changes where or when - these are basically 3 offices with some people in all of them. –  user7385 Dec 3 '09 at 22:09
add comment

I know I'm late to the party, but it is possible to synchronize 3 (or more hosts) with unison. I do this regularly with four machines. I created a star-shaped topology, in which one host is designated 'central', and the others synchronize against this 'central' node, never against each other. It is easiest if there are no changes on the central node. In your case, this would require a fourth node.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.