I have a web application. It is database and file driven (database is postgresql, users upload and create files)... I would like to balance the load between two+ servers, and that means not only database replication (which I can achieve with tools like Slony), but also real-time file replication.

The file replication is necessary because a user could log in in a first server, log out, then log in in the other server (because of the balancing), and his files should be there. I don't really need to duplicte the whole drive, just a group of folders.

Also because if one server fails, I would like to have the other one with a full set of all data & files.

Is there any tool available on linux that automates reliable file replication, like the way Slony does for databases ?

Is DRBD a recommended solution ?

  • Would mounting a network drive (NFS share) work for you? If not, why not?
    – David Z
    Jun 26, 2010 at 6:44
  • maybe... i´m looking for the simplest of solutions, yet scalable and efficient : )
    – arod
    Jun 26, 2010 at 14:41

2 Answers 2


We use Gluster for this, it works like a charm.


What is needed is a bidirectional filesystem (or folders) syncing. Search for Unison or DirSync Pro and give them a try

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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