Wednesday, November 28th, 2007

automatic backups of windows vista to external

I’m building a backup system for a client today. She just upgraded from an old XP workstation to a vista business edition workstation. The computer they sold her came with no IDE bus and no CDrom drive. She wasn’t expecting that…it must have been one of those ‘good deals!’.

Since it has no IDE bus, her old tape drive is out the window, and the arcserve backup software she was running doesn’t work with Vista. She needs daily automatic backups with the option to take things offsite. This is what I did.

I got her two external mybook 320g’s, and started off writing a batch file using xxcop, but it has this user control intervention with windows Vista where you have to hit an input key. I googled around a little bit looking for a way to send keystrokes inside a batch file, and started testing out a few different methods until I realized that the batch file does not pick up control until the first command xxcopy passes back a return value, and thus it would not fit my purposes.

Next I checked xxcopy documentation to see if it had a switch to remove the “This version of xxcopy has never been testing in the current operating system environment.” No game.

After that, I moved on to start playing with robocopy. After a few failed steps I found the /MIR and /W:n /R:n switches to come up with these commands.

robocopy C:\users\laura\documents E:\backuproot /mir /R:2 /W:5
robocopy C:\old.hd\data E:\Backuproot /mir /R:2 /W:5

The first two segments are the source and the destination, respectively, the /mir switch creates an exact duplicate of the file structure, the /R:2 switch limits file retries to 2 times, and the /W:5 waits for 5 seconds between file retries.

Tried this…only apparently the /mir switch includes a /purge, and since I am running two separate commands one right after another with the same destination directory, this causes them to overwrite each other.

Alright next idea…we’ll split the destination folder into two…now we have

E:\backuproot.data
E:\backuproot.docs

with each robocopy command going to it’s own folder. This test is running now. I intend to have the client rename the backup folder to the current date whenever she wants to create a permanent backup…if she does this I wonder if robocopy will be smart enough to create it’s own destination folder. We’ll check that next.

Sweet, robocopy went ahead and created the new destination folders all on it’s own. One little thing, right now she has to copy these two folders into a new location in order to create a lasting backup, I’d like it if she only had to rename the existing folders as planned, in order to do this, I’ll have to nest those two destination folders inside a new folder and update the batch file to reflect those changes.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Technorati
  • Furl
  • Haohao
  • Twitter

Leave a Reply