Today, bitbucket has enabled support for git repositories!! This means that, with a little hack and thanks to the sparkleshare project, we can make a home-made dropbox without limits of disk space.
Bitbucket is a repository hosting service, like github, sourceforge, and many others. The good thing about bitbucket is that there are no limits of space and private repositories. I use it for almost all my personal projects and for backups.
Sparkleshare is a free software designed to automatically syncronize a folder on a remote git repository. In principle, you can choose one or multiple folders in your filesystem, and sparkleshare will automatically syncronize it to a remote repository, such as one on github, bitbucket or another server. Every time you will move or change a file, Sparkleshare will automatically create a commit and push it to the remote server. In short, it is like Dropbox, but it can be used on multiple folders, and you have to find the remote repository to host the files.
So, since bitbucket now enables git repositories, we can use it with sparkleshare. The process is quite simple:
- Get sparkleshare and install it to your computer
- I had difficulties to configure sparkleshare to work directly with bitbucket, so I have created a repo on github first and then changed the url in the config file.
- Create an account on github, upload the SSH key that sparkleshare has created in ~/Sparkleshare, and create a repo there;
- Go to bitbucket, create a private repo, and upload the same SSH key there;
- start sparkleshare, select the ‘github’ option, and tell him to syncronize the folder with your github repository;
- open the folder, and edit the hidden file .git/config; replace the github url with the bitbucket url;
- that’s it; enjoy 🙂
Having a limitless home-made dropbox is cool; however, there are many reasons why I don’t recommend you to abuse this system.
First of all, git is slow when handling big files. If you try to syncronize big files such as movies etc (please do not use this for illegal stuff), you will waste a lot of bandwidth, and the syncronization will be very slow.
Third, and last, there is not really need for this. There are a lot of alternatives that already that provide cloud hosting for your backups. I will list a few:
- dropbox is free and gives you 2 GB, plus 250 MB for each invitation (note: this link is an invitation, if you register through it, you and I will get 250 MB extra).
- Ubuntu One already gives you 5 GB for free, and is great at syncronizing preferences and configurations. Now they have also created a Windows client, so there is no excuse to not use it. I only wish that they will fix the http proxy issue soon.
- Minus.com gives you up to 10 GB of remote file storage, although it doesn’t get syncronized automatically as the other systems (note: this link is an invitation, if you register through it, you and I will get 1 GB extra).