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?
-
2What are you trying to accomplish? Without some context, there's no way to answer this. – MDMarra Apr 20 '11 at 19:03
-
1What 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
4 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.

- 133,124
- 18
- 176
- 300

- 6,582
- 1
- 28
- 34
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

- 1
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.

- 651
- 5
- 7
Synchronous: Software using File Systems:
- Using GFS File System
- Using HDFS File System
- NetApp StorageGRID WebScale with File Gateway - proprietary Software
Synchronous: using proprietary Hardware:
- NetApp MetroCluster (Hihg-Avalability). Second site not available for R/W until disaster takeover/switchover. Data 100% in Sync.
- NetApp SnapMirror Sync (an the moment 7-Mode only). Second site available for RO with 3 min delay (but data 100% in Sync), manual takeover.
Async Software:

- 515
- 1
- 5
- 18