TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Simple realtime two-way sync with SSH, fswatch and rsync

71 点作者 headgasket大约 6 年前

10 条评论

theamk大约 6 年前
So I was wondering, how do you do two-way sync with inheritly one-way tool like rsync? And turns out you cannot do it, not reliably.<p>The way script works, it runs change monitor on both sides; if there is a change on local side, it will do local-&gt;remote sync; if there is a change on remote side, it will do remote-&gt;local sync.<p>This can go wrong in many, many ways. Here is the first example that came to my mind: you started a process on remote machine which creates lots of small files -- maybe extracting an archive, or generating images. So the syncer keeps syncing those files in remote-&gt;local direction. Meanwhile, you got bored watching the script and decided to edit some code. POOF! Any edits you make are continuously reverted.<p>Oh, and there is no error checking anywhere. Did your network had a hickup? Tough, we will march on anyway. Let&#x27;s it was not in lines 101 or 104 -- if these commands have transient failures, then your newly made changes would just get reverted.<p>If you care about your data, please do not use this. Use anything else -- syncthing, osync, unison were named in this thread, they are all good.
评论 #19459656 未加载
评论 #19459524 未加载
评论 #19460802 未加载
rasengan大约 6 年前
Cool project! Another alternative is to just use unison. Not only is it cross platform for windows, Mac and Linux, but on top of that it “just works”.<p>Amazing stuff. Brew, Cygwin and your favorite package managers have it.
评论 #19458567 未加载
评论 #19458512 未加载
评论 #19458760 未加载
评论 #19458713 未加载
senorsmile大约 6 年前
I highly recommend osync(1). It has been around a while and has had quite a few users report bugs. The maintainer is active and very helpful. I&#x27;ve used it for a few years now with great success.<p>1: <a href="https:&#x2F;&#x2F;github.com&#x2F;deajan&#x2F;osync" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;deajan&#x2F;osync</a>
评论 #19458679 未加载
m-p-3大约 6 年前
Nice system, but I think I&#x27;ll stick to Syncthing for the time being.
systemspeed大约 6 年前
These sorts of solutions are always tantalizing, especially when developing on a Mac but deploying on Linux, but the killer feature for such an application would be IDE&#x2F;ST3&#x2F;Atom&#x2F;VSC[&#x2F;etc...] support. If this sync process could be orchestrated from such a development environment directly, it would avoid many design pitfalls, such as degenerating into rapid fs polling.
评论 #19458603 未加载
orliesaurus大约 6 年前
I use a few rsync scripts and build shortcuts, but gonna try yours honestly!
jasonhansel大约 6 年前
For one-way sync, I&#x27;d also suggest: <a href="https:&#x2F;&#x2F;axkibe.github.io&#x2F;lsyncd&#x2F;" rel="nofollow">https:&#x2F;&#x2F;axkibe.github.io&#x2F;lsyncd&#x2F;</a>
mamcx大约 6 年前
Related, any option to sync files that work from iOS&#x2F;Android (excluding dropbox, just to make things hard)?
评论 #19458982 未加载
techntoke大约 6 年前
Do you feel that it is production ready and that the sync won&#x27;t become corrupt? Any plans for Android?
评论 #19458699 未加载
etaioinshrdlu大约 6 年前
I have a few qualms with this app: 1. For a Linux user, you can already build such a system yourself quite trivially by using Dropbox.<p>2. It doesn&#x27;t actually replace Dropbox.<p>3. It does not seem very &quot;viral&quot; or income-generating. I know this is premature at this point, but without charging users for the service, is it reasonable to expect to make money off of this?<p>(Silly satire.)
评论 #19458809 未加载