Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I run a combination of rsync+git as cron jobs. They keep all 4 computers in the house in sync with each other as well as backups on a NAS.

Why even bother with rsync you may ask? Because for huge binary files (like RAW/JPEG images) I don't need a history of changes and they don't compress well, i.e. git would lead to an increased disk usage.

BTW using "any VCS" advice won't work here. Git can automatically pick up rename/delete/create actions on whole directory trees without explicit commands, which is what you want if you're going for 100% automatic operation: if I delete a file on laptop "A" it will automatically disappear on laptop "B" too. Perhaps git isn't unique in this, but its better among other VCS systems I'm familiar with. It also is very compact, especially if you don't want to have a full-blown uncompressed working tree on a server.

I love Dropbox, but I don't see how I could use it with my 55K/second upload speed, which is, unfortunately, quite typical for US users. (my server is in the closet). If I were them I would seriously consider selling a NAS+software kit. It's hard to imagine a middle class multi-laptop family that doesn't need one of those.



Hi Gregg, I like your setup, would you mind describing it a bit more? like a mini tutorial or schema drawing, so it could reproduced easily by another geek like me :)

Or I'll take it as a challenge, and as soon as I've got some time I'll try to do something kind-of like your setup ;)


* Have a linux/osx box that will be your server. Have ssh and git installed and configured.

* Configure all client laptops with passwordless ssh logins to the server (i.e. using certificates) and install git on them.

* Create a bare git repo on the server. I have a repo for each user.

* Have a ~/backup.sh script (better call it backup.command on macs) each of your client laptops that looks something like this (this one is for OSX):

http://pastie.org/358427

Then create a cron job that runs this file as often as you want. It's actually pretty efficient, in my case runs in about 3 seconds if there are no significant changes.

My laptops run it every 20 minutes and my home directory (and music, photos and other stuff) is 100% identical on all computers I work on.

The server, in turn, can be configured to encrypt and push your stuff at night over to your slicehost account or something, when you're not using your connection and this the speed isn't much of an issue.


"Configure all client laptops with passwordless ssh logins to the server (i.e. using certificates) "

Short version of this step:

on each client, run ssh-copy-id user@server




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: