类似于 Dropbox 的 git 服务——不使用 rsync 和 inotify
对于如何使用 git 设置类似 Dropbox 的服务,您有什么建议吗?
您认为 git 是合适的工具吗?
我正在考虑使用 git + rush 解决方案,您对此有何看法?
Do you have any advice as how to setup a Dropbox like service using git?
Do you think git is the right tool for this?
I was thinking about using a git + rush solution what do you think about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
查看这个开源项目:https://github.com/hbons/SparkleShare
从项目的自述文件中:
Checkout this open source project: https://github.com/hbons/SparkleShare
From the project's README:
如果您拥有远程服务器并且正在运行 Linux,那么您只需将一个文件夹中的 rsync 设置为“每 10 秒”一次的计时作业即可。
你可以在 Linux 上安装一个东西,它可以为你提供 Mac 时间库或 Windows 卷影副本等功能。让它在远程服务器上运行。
这绝不是像服务保管箱目前为您提供的那样好,但它是免费的,可以节省服务器空间...
更新
阅读了有关 Git 如何工作的更多信息(查看wiki 页面,来自 Linus 的引用是一流的)似乎您所需要的只是获取远程服务器,并设置一个 cron 作业来定期提交您的更改并下载任何更新,因为这样您就可以共享文件以及与多台计算机。
不确定 Git 有多安全,其他人可以直接开始阅读它还是需要知道密码或其他什么?在这种情况下,请在加密分区中运行它。
If you own a remote server and you are running linux then you can simply have a folder that you
rsync
set it up as a 'every 10 seconds' chron job for example.There was a thing you can install onto linux that gives you the mac time vault or windows shadow copies like feature. Have this running on the remote server.
This is by no means going to be as good as a service dropbox currently gives you, but it is free, save the server space...
UPDATE
Having read up more about how Git works (check out the wiki page, quote from Linus is top notch) seems all you would need is to get the remote sever, and set up a cron job that regulary commits your changes and downloads any updates, as this way you can share files as well as sync with multiple computers.
Not sure how secure Git is, can others just start reading it or do they need to know a password or something? in which case, run it in an encrypted partition.
谢谢 thecoshman,你让我进入了 rsync 的正确方向。
问题是 cron 作业似乎不是一个有效的选项,我希望有一个更改通知程序:
输入: inotify
这是一个精彩的开源 Dropbox 解决方案的博客条目。
更新:
github 上有一个项目,它是博客文章讨论的结果,名为 口型同步
Thanks thecoshman you got me into the right direction rsync.
The problem was that the cron job didnt seem a valid option I'd have liked to have a change notifier:
Enters: inotify
And here it is a wonderful blog entry for an Open Source Dropbox solution.
UPDATE:
There is a project on github which s the result of the blog post discussion it's called lipsync
我开发了一个超级简单的脚本,使用 git 和 cron 在多台 Linux 计算机之间同步文件夹。
它自行安装所有内容或解释如何执行此操作:在本地计算机和服务器上安装 git,安装公共/私有 ssh 密钥,检查 sshd 是否已安装...
我已将其放在 github 上:
https://github.com/photonOli/gitBox/
I've developed a super simple script that use git and cron to sync folders among several linux computers.
It installs everything by its own or explains how to do it: install git on local machine and server, install public/private ssh keys, check sshd is installed...
I've put it on github:
https://github.com/photonOli/gitBox/