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 to have a certain directory synchronized across multiple linux machines, so that changes on one machine are either pushed to the other copies or easily polled. I'm ok with having one master and the others as slave.

I thought about rsync, heard about unison, and I am sure there are other tools, but I've never tried using any for syncing more than two machines.

I'm looking for something that is super easy to install and configure.

I'm also looking to stay behind our firewall, without using third-party sites.

share|improve this question
    
related question: superuser.com/questions/46441/rsync-as-a-background-process –  Doug Harris Dec 17 '09 at 21:18
    
@Doug: I've seen that question, but my concern is multiple servers. –  Uri Dec 17 '09 at 21:34
add comment

7 Answers

Setup a FREENAS?

FreeNAS™ is an Open Source Storage Platform based on FreeBSD and supports sharing across Windows, Apple, and UNIX-like systems. FreeNAS™ 8 includes ZFS, which supports high storage capacities and integrates file systems and volume management into a single piece of software.

share|improve this answer
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Diogo Aug 9 '12 at 13:55
add comment

Google had a summer of code project called TSync that looks to be a good replacement for Unison. ( http://sourceforge.net/projects/tsyncd/ ) It doesn't seem to have a lot of documentation and following though so I've always been nervous about using it within a business environment.

share|improve this answer
add comment

Unison is a good file synchronizer which works for both Windows and Linux. Contrary to rsync, unison can synchronize in both ways (csync can do that, too, by the way, but it's kind of harder to setup as far as I can remember).

From what I've heard, iFolder is a good replacement for DropBox/SpiderOak, but I haven't tried it personally.

If you choose rsync, there's several ways to call it:

  • From cron, on a regular basis (e.g. once every 10 minutes or once every 1 hour)
  • From incron, reacting on events (e.g. everytime a file is modified or created in a directory).

You can also combine the two methods to be sure: - Fire from incron to be sure to copy the modified file. You can even use scp directly sinc e you know the file that changed, so it'll be more efficient - Call rsync from a cron to fix copies that might have failed, or apply a --delete option to remove files that are not on the other side.

share|improve this answer
add comment

Csync2 is a tool designed to synchronize configuration files among multiple servers. It has various strategies for handling conflicts, can keep backups of changed files, and has a very flexible configuration. I've used it in a number of situations and I've been happy with it.

share|improve this answer
    
I know this is an old post, doesn't look like Csync2 compiles against sqlite 3, and running into issues getting the right source for 2.8.17. Have you had any luck? Or using the csync2 2.0 RC1? –  CrackerJack9 Oct 31 '11 at 20:40
add comment

Have you considered using something like NFS?

share|improve this answer
    
I'm setting it up on a client's multi-machine test environment; the less I require the clients to do the better luck I am going to have. –  Uri Dec 17 '09 at 21:53
add comment

What about DropBox?

share|improve this answer
    
I like DropBox for my own personal use. Plus, with referrals I'm up to 2.75GB of storage. :) Comes with a nifty web interface as well, and can allow URLs directly to specific files, though I've never needed that myself. –  JMD Dec 17 '09 at 21:12
    
Unfortunately it's proprietary stuff so I can't take it outside the firewall or host on third-party. –  Uri Dec 17 '09 at 21:14
    
I tend to prefer SpiderOak over DropBox: more space for the same price, more security (at least better explanations of how they implement it), open-source contributions... It still doesn't fix the issue that it's a third-party service, but at least they ensure proper client-side encryption of your data, which DropBox doesn't imo. –  ℝaphink Dec 17 '09 at 21:56
add comment

rsync will do. Easiness of install is subjective, it deppends of your skills :)

share|improve this answer
    
rsync is worth the learning curve. Note that it doesn't auto-sync on any file change. You will need to create a simple cron job to run it every minute (or at whatever interval is appropriate). –  Doug Harris Dec 17 '09 at 21:17
    
Is there a way to get rsync to push to multiple servers, or do I just write a script that runs multiple rsync commands? My understanding is also that I have one rsync server and each of the clients has to poll –  Uri Dec 17 '09 at 21:35
    
You can write a push script on the master to push to each of the clients. It will be one rsync call per client (either hard-coded or in a loop) –  Doug Harris Dec 17 '09 at 22:17
    
rsync is installed on a lot of linux machines by default, and if not, it's going to be in the repos, so it should be one command to installed it. –  Dentrasi Jun 27 '10 at 17:37
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.