简体   繁体   English

使用git的Dropbox服务 - 没有rsync和inotify

[英]Dropbox like service with git — no with rsync and inotify

Do you have any advice as how to setup a Dropbox like service using git? 关于如何使用git设置类似Dropbox的服务,您有什么建议吗?

Do you think git is the right tool for this? 你认为git是适合这个的工具吗?

I was thinking about using a git + rush solution what do you think about it? 我在考虑使用git + rush解决方案你怎么看待它?

Checkout this open source project: https://github.com/hbons/SparkleShare 查看这个开源项目: https//github.com/hbons/SparkleShare

From the project's README: 从项目的自述文件中:

How does it work? 它是如何工作的?

SparkleShare creates a special folder on your computer. SparkleShare在您的计算机上创建一个特殊文件夹。 You can add remotely hosted folders (or "projects") to this folder. 您可以将远程托管的文件夹(或“项目”)添加到此文件夹。 These projects will be automatically kept in sync with both the host and all of your peers when someone adds, removes or edits a file. 当有人添加,删除或编辑文件时,这些项目将自动与主机和所有同行保持同步。

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. 如果你拥有一台远程服务器并且你正在运行linux,那么你可以简单地将一个rsync设置为“每10秒钟”的chron作业。

There was a thing you can install onto linux that gives you the mac time vault or windows shadow copies like feature. 有一件事你可以安装到linux上,为你提供mac时间保险库或windows shadow副本功能。 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... 这绝不会像目前给你的服务dropbox一样好,但它是免费的,节省了服务器空间......

UPDATE 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. 阅读了有关Git如何工作的更多信息(查看维基页面,引用Linus是一流的)似乎只需要获取远程服务器,并设置一个cron作业,定期提交更改并下载任何更新,通过这种方式,您可以共享文件以及与多台计算机同步。

Not sure how secure Git is, can others just start reading it or do they need to know a password or something? 不确定Git有多安全,其他人可以开始阅读它还是需要知道密码? in which case, run it in an encrypted partition. 在这种情况下,在加密分区中运行它。

Thanks thecoshman you got me into the right direction rsync. 谢谢thecoshman,你让我进入正确的方向rsync。

The problem was that the cron job didnt seem a valid option I'd have liked to have a change notifier: 问题是,cron作业似乎不是一个有效的选项,我希望有一个更改通知程序:

Enters: inotify 进入: inotify

And here it is a wonderful blog entry for an Open Source Dropbox solution . 在这里,它是一个开源Dropbox解决方案的精彩博客条目

UPDATE: 更新:

There is a project on github which s the result of the blog post discussion it's called lipsync 在github上有一个项目是博客文章讨论的结果,它叫做lipsync

I've developed a super simple script that use git and cron to sync folders among several linux computers. 我开发了一个超级简单的脚本,使用git和cron在几台Linux计算机之间同步文件夹。

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... 它自己安装所有东西或解释如何操作:在本地机器和服务器上安装git,安装公共/私有ssh密钥,检查sshd已安装...

I've put it on github: 我把它放在github上:

https://github.com/photonOli/gitBox/ https://github.com/photonOli/gitBox/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM