Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the best way to sync two folders completely in real time over two servers (Ubuntu) in same network? Do you think syncing folders is a better idea than having a shared folder? If a shared folder is better, how can I set this up?

share|improve this question
2  
What are you trying to accomplish? Without some context, there's no way to answer this. –  MDMarra Apr 20 '11 at 19:03
1  
What do you mean by "real-time"? With any synchronization, there's going to be some latency; whether it's noticed or not is a different matter. –  gravyface Apr 20 '11 at 22:32
add comment

3 Answers

I'd personally lean towards a shared folder for this sort of thing. But it does depend on exactly how you're using it. (I'd recommend following Mark's advice for more context)

For Linux, the easiest thing thing would be using NFS mounts. You can do it one of two ways. Either 1) export the folder from one of your two servers, and have the the other mount it, or 2) have a separate server (ie: A centralized file server) export a folder, and have both servers mount it. Generic documentation on how to use NFS can be found all over the place. But sound off if you need specifics.

share|improve this answer
1  
NFS over DRBD may be what he wants if he needs HA. –  Zoredache Apr 20 '11 at 22:41
add comment

I think NFS is the way to go. Sharing instead of synchronization saves on network traffic as well, but it depends upon your ultimate goal. If backup or DR is your goal, perhaps a fileshare is not the answer.

share|improve this answer
add comment

I use gbridge because I'm usually using Windows, that seems to work pretty well, but since you want to something for ubuntu, you could check out unison, although I haven't tried it myself, it seems like it might work for you

http://www.ubuntugeek.com/unison-file-synchronization-tool.html

share|improve this answer
    
Does Unison do real time sync? –  Stefan Lasiewski Apr 20 '11 at 20:29
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.