0

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.

3

7 Answers 7

5

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

4
  • 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). Dec 17, 2009 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, 2009 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) Dec 17, 2009 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, 2010 at 17:37
3

What about DropBox?

3
  • 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, 2009 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, 2009 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.
    – raphink
    Dec 17, 2009 at 21:56
1

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.

1
  • 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? Oct 31, 2011 at 20:40
1

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.

1
  • Could you/someone explain why unison needs a replacement, and why TSync looks good in that respect ? I've heard only good things about unison until now.
    – YoungFrog
    Aug 3, 2015 at 6:56
0

Have you considered using something like NFS?

1
  • 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, 2009 at 21:53
0

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.

0

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .