Before I begin, I’ll assume that you know how to setup cygwin on windows and install various packages. if not then you should really go to the cygwin homepage and read up on it first.
Since creating a cygwin setup on my workstation I have begun to finally get my files organized. I took a tip from LifeHacker’s Gina Trapani’s article, written in 2006, about using just a simple 6 directories as the basis for the organization. Her idea was to use a bak, docs, doc-archives, multimedia, junkdrawer (I called mine temp) and scripts.
Being the type of person I am I figured it was best to start there and move down the trees in as many subfolders as needed. The easiest thing to do was getting the directories set up, but I had to move them at least once as it turned out is was going to bog my workstation down pretty quick with moving all these files around. For some I would even need to sync them to a portable drive to have access to them. I did make the final decision to move them over to the network drive I was connected to.
What makes this whole thing so simple is the rsync utility. After you’ve made your master setup, it becomes trivially easy to make backups to a portable or other drive location.
Typically in a windows setup you will have your mount points under the /cygdrive directory. So if you are using a netwrok or portable drive to send your backup to, then you need to find out where cygwin thinks that drive is located. It will most likely have the same drive letter as it does in windows, but check it to make sure.
For me it was as simple as creating the directory I wanted the backup to go to (in my case a backup of cygwin_home) and telling rsync to get started.
rsync -av ~/* /cygdrive/l/cygwin_home/
The trailing slash is significant. Also I was making it run in archive mode (-a), and verbose (it tells me each file it touches, the -v). The -a is what I use to make sure it copies everything over including directories and that it goes through all the subfolders as well like a -r flag (for recursion) would do.
Once this major item is done then it just becomes a habit to run this everyday or however long you want to choose to do it so that you can maintain a backup of a set of directories.
Be sure to run a check before so that if you try the delete function with the rsync operation, that you don’t accidentally delete files you wanted to keep. Experienced it myself this weekend.