类似于 Dropbox 的 git 服务——不使用 rsync 和 inotify

发布于 2024-08-30 01:29:55 字数 109 浏览 10 评论 0原文

对于如何使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

本王不退位尔等都是臣 2024-09-06 01:29:55

查看这个开源项目:https://github.com/hbons/SparkleShare

从项目的自述文件中:

它是如何工作的?

SparkleShare 在您的计算机上创建一个特殊文件夹。您可以将远程托管文件夹(或“项目”)添加到此文件夹。当有人添加、删除或编辑文件时,这些项目将自动与主机和所有同行保持同步。

Checkout this open source project: https://github.com/hbons/SparkleShare

From the project's README:

How does it work?

SparkleShare creates a special folder on your computer. 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.

夜灵血窟げ 2024-09-06 01:29:55

如果您拥有远程服务器并且正在运行 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.

旧话新听 2024-09-06 01:29:55

谢谢 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

够运 2024-09-06 01:29:55

我开发了一个超级简单的脚本,使用 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文