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?
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?
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.
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
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.
Synchronous: Software using File Systems:
Synchronous: using proprietary Hardware:
Async Software: