Secure backup using rsync and SSH

I just found this article in my unpublished posts… not sure why I didn’t publish it, but there we go.

How to automatically back up your computers with rsync – Lifehacker

I saw this article pop up in google reader on Thursday, and realised that it was actually a pretty good idea. My DreamHost account comes with 200GiB of disk space and 2TiB of bandwidth. Additionally, these both grow in size every week by 1GiB and 16GiB respectively, so I’m hardly even losing data by backing stuff up. You’ll also need some kind of linux server that you can upload to, you may want to consider creating a DreamHost account.

Unfortunately, it’s not really as easy as it looks if you use Windows. I wanted to back up the My Documents folder, which as you might be aware, is a “special folder” (along with My Music, Shared Documents, etc.). Special folders will contain a file called desktop.ini that contains information about the folder (its name and icon, for example). However, according to KB326549, Windows likes to do something a little… unorthodox with the folder permissions – Windows will only look for the desktop.ini file if the folder is marked as read-only. Actually setting the folder as read-only, though, doesn’t actually make the folder read-only: in its infinite wisdom, Windows typically ignores the flag.

So, you might be thinking: “Why does that matter?” right now. Well, in order to run rsync, you will need to install Cygwin, which is (more or less) something that lets you compile unix programs and run them on Windows. Before you run away at the mention of the word “compile”, don’t worry – Cygwin comes with many programs pre-compiled for you, rsync and ssh included. You can get Cygwin here. I think it’s a pretty handy way of backing my stuff up.