3

Something that can really keep 2 folders synced, not like rsync which is more or less just an advanced cp. I need to achieve this:

Have two systems s1 and s2, and folder "files" on both of them.

I need to make it so that when user "John" log on s1, create a folder "foo" inside of "files" folder, the syncing subsystem create this folder on s2 as well. Then do the same for files user "John" copy there and finally, if another user logon to s2 or s1 and delete the folder "foo" the syncing daemon would delete this folder on both servers.

Is there something that can achieve this? Is it even possible for rsync to do that? I don't need to simply just copy 1 folder on 1 system to another system, I need to achieve similar sync as which for example dropbox provides.

Petr
  • 1,711
  • 2
    You need shared disk file systems like OCFS or Lustre. Or block level replication like DRBD – Milind Dumbare Mar 17 '15 at 08:05
  • 2
  • That wouldn't help, I need this to speed up the access to files, imagine you have 2 distant servers, one in US and other one in China, you want people in China to have very fast access to files as well as people in US, in this case you don't want to have 1 central server which everyone has to access, you want to have multiple of them which just sync the contents – Petr Mar 17 '15 at 08:08
  • You say in your question: "I need to achieve similar sync as which for example dropbox provides". That is Syncthing. And it doesn't run on a single central server, but on the synced machines... – jasonwryan Mar 17 '15 at 08:09
  • Yes, I would accept that as an answer if you move that to answer instead of just a comment – Petr Mar 17 '15 at 08:28
  • BTW my comment that this wouldn't help, was pointed to Miline, not you, I can't edit the comment to fix that... – Petr Mar 17 '15 at 08:29
  • rsync will allow you to 'proper sync' - mostly it's used for updating, but the --delete option will delete files on destination that aren't present on source. – Sobrique Mar 17 '15 at 09:36

2 Answers2

3

An alternative to syncthing is unison, which I've been using, on and off, for several years. Available in a repository near you. See http://www.cis.upenn.edu/~bcpierce/unison/

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
2

Syncthing does the the job if you want something to, well, be synced. Do refer to their documentation as I have only used it a few times. Perhaps the Getting Started manual will, umm, get you started with using Syncthing.

Aloha
  • 2,111
  • 1
  • 15
  • 22
  • I am wondering if you really figured this out yourself, or just copied the answer-in-comment of @jasonwryan, taking his credit? :P – Petr Mar 17 '15 at 09:42
  • A little bit of both, but mostly from experience. Credits to @jasonwryan though. – Aloha Mar 17 '15 at 09:43