Friday, February 15, 2008

 

Robocopy for Mirroring Directory(ies) to a Backup Disk

I did quite a bit of looking around for a way to backup my documents and music and other files on my new Vista PC. I have a second disk in my system and wanted to mirror my important data to that second disk. There's a backup utility built in to Vista, but it doesn't have a way to exclude directories (!) and I have some directories with large, static data that I already have backed up elsewhere and don't want to include on the backup disk.

I found a bunch of mirroring tools, and none seemed very good. I don't need it to run unattended, because I remember to do it often enough and also I don't leave my PC on overnight usually.

I settled on Robocopy.exe, a command-line tool that isn't in Vista by default but I was able to get it by installing the Windows 2003 Resource Kit. Robocopy is working great for me. It took some effort to figure out the command-line switches, but now I have a batch file that I can run once in awhile to mirror my important data to my backup disk. It's been reliable, synchronizes directories by deleting files in the destination that have been deleted in the source, and is very fast by not copying files that are already sync'd.

Here's the command I'm using to mirror my user folder on the backup disk:
robocopy "c:\Users\Ryan" "e:\Sync Folder\Ryan" /MIR /XJ /R:1 /ZB /S /W:1 /XD "AppData" /XF "ntuser.*"


Monday, February 14, 2005

 

Inno Setup

I just tried Inno Setup, a free install-builder by Jordan Russel. I can't believe how quickly I got the features I wanted (desktop shortcut, start program at end of install, quick-launch option). From first seeing the Inno Setup web site to having my install built and working took about 6 minutes. Unbelievable. I wasted multiple days trying to get VS.Net's built-in install builder to do everything I wanted. I wish I'd found Inno Setup sooner.

Tuesday, January 18, 2005

 

Deleting Files By Regular Expression with Agent Ransack

I just found a good way to delete a bunch of programming tool temporary files (like .obj and .pdb files). I have a directory under which I have hundreds of development projects in different languages, and to back it up I either have to select the files I specifically want to backup or delete the files I don't want to backup first. So far I'd been using a script, but due to my discontent with the excruciating awkwardness of JScript, I'm switching to using Agent Ransack....
Update: Since this post I've started using Jeff Atwood's Clean Sources Plus, (created from Omar Shahine's original Clean Sources). Clean Sources Plus adds a context menu item to Windows Explorer, so it is very handy. It deletes files based on regex's stored in a .config file, so it makes preparing source directories for backup a snap.

Friday, January 07, 2005

 

Blogger.com Template Show/Hide Setup

I spent quite a bit of time getting my blogger.com Template set up to have a Show/Hide capability a little better than that provided in the Blogger Hacks instructions for a show/hide link. ...

Thursday, January 06, 2005

 

C#/.Net Logging

I went looking for a good C#/.Net logging (Logger) library to use on a home project. I found two main ...

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]