Dropbox like service with git -- no with rsync and inotify
Do you have any advice as 开发者_如何学JAVAhow 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?
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.
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.
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
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/
精彩评论