Windows

Video: Create a custom backup tool with Windows Vista's Robocopy

Windows Vista includes a powerful, but hidden utility, called Robocopy that makes backing up files a snap. In this IT Dojo video, Bill Detwiler shows you how to access Robocopy and how to create a custom command-line script that backs up files to an external hard drive.

If you're a savvy Windows Vista user or IT professional, you've probably used Vista's Complete PC Backup to image your hard disk and you scheduled regular backups through Windows Backup.If you don't really trust Vista's built-in tools or just like to have additional copies of your really important files, Vista includes a powerful, but hidden directory replication utility, called Robocopy that makes backing up files a snap. In this IT Dojo video, I'll show you how to access Robocopy and how to create a custom command-line script that backs up files to an external hard drive.

After watching the video, you can read Greg Shultz's article, "Create a custom backup tool with Vista's Robocopy"--the basis for this video.

About

Bill Detwiler is Managing Editor of TechRepublic and Tech Pro Research and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop supp...

37 comments
chris_black
chris_black

I'm using the Robocopy GUI. As soon as I hit "Run" a box says "Robocopy Job finished" almost immediately, yet the copying is still taking place. Question: How can I tell for sure the copying is actually complete?

buzzardweb
buzzardweb

As always I enjoyed Bill's video and I eventually got robocopy to work. Being in the United Kingdom I suspect that USA opening and closing quotes are not the same as ours so I had to type them in afresh before it would work. Keep the videos coming Bill !

Jacky Howe
Jacky Howe

I was wondering how I would get around it. You have provided a means to do just that with RoboCopy. I have been using xcopy but I will have a play with RoboCopy now. I prefer to use the built in functions and not having to install addons.

TravisFx
TravisFx

Sorry Bill but your outtakes are more interesting on this one. They're always pretty funny ;) Yes robo's been around a while..Careful with /MIR switch. If you get yer source and dest mixed up... you could wipe out your photos quicker than you can say "Oh fh..."! I found FBBackup from Freebyte to be a great little free tool. You can add multiple source folders to backup to a single dest folder. I find that useful. But yes.. robo has some interesting stuff I guess.. but ....yawn..sorry!

mdhealy
mdhealy

Another excellent file management tool called xxcopy from xxcopy.com is free for personal use, for commercial use the license starts at about 40 bucks for one system and runs about 9 bucks per system in quantity. The developer has been working on it for over 20 years, so both the website and the program have a "Back To The Future" feel, this tool is a real throwback to Ye Olden Days of the DOS Knights: no GUI, lots and lots and lots and lots of commandline options, pages and pages and pages of tutorials on how to do this or that file management task, etc. Clunky but powerful. You name it, there's a tutorial somewhere on the website telling how to do it; once I've found the arcane commands required to do my task and made whatever tweaks are needed to do exactly what I want, I don't even try to remember the needed incantation, I just make a little batch script that prompts as appropriate and runs the command.

NadiaSz
NadiaSz

Thank you very much for informative and useful video.

PaleSash
PaleSash

I have tried a number of options, robocopy included, and have found Microsoft's SynchToy to do just what I need. I simply select groups of folders and set a synch option and then have it run via the task scheduler. It has a simple GUI and sorts me right out. Highly recommended as an alternative to robocopy

butkus
butkus

There are better "free" backup programs that you can change easily. Not doing DOS again !

jsmith
jsmith

You have the right command for a 15 second wait but after that you have 5 seconds on screen

jkoske
jkoske

Thre is a free tool that you can download from Microsoft called Robocopy GUI that simplifies the use of Robocopy

ww_eason
ww_eason

Great tools! Wonder how many other hidden tools does Vista has.

brian.hunt
brian.hunt

What about restoring the files on a Notebook: I work on a Desktop during the day, and a Notebook in the evening

lester
lester

Well done Microsoft you've managed to take someone else's idea yet again and badge it as your own! If you think this looks familiar take a look at XXCOPY. I've been using the freely available XXCOPY for years which does everything Robocopy does and will run from a DOS prompt. see: xxcopy.com published by Pixelab, Inc.

Rufar
Rufar

Nice find! Thanks.

kupplerski1954
kupplerski1954

Something is wrong w/ this video...I can only see five seconds of it, and then it quits.

Bill Detwiler
Bill Detwiler

Robocopy is a fantastic Windows utility for moving large amounts of data across a network or to an external drive. In an IT Dojo video, I explain how to create a Robocopy script that backs up files to an external hard drive. Original blog post: http://blogs.techrepublic.com.com/itdojo/?p=187 Unfortunately, I haven't been able to find a suitable, free Mac OS X equivalent. I've looked at tools like rsync and ChronoSync, but neither seems like a perfect replacement. Building scripts in rsync appears to be a bit more complicated than Robocopy, and ChronoSync isn't free. If you support Macs, do you know of a free utility that works like Robocopy?

jones28s
jones28s

I checked out some of the free programs, but found none would do all that I needed. Command line commands make it easier to manipulate what you want to do. OK. Quick question.... I've currently got a Vista machine running a backup using the "xcopy" command. Is there a big difference between using "xcopy" and "Robocopy"?

kimo99
kimo99

Does not work on 64 bit Vista/XP machines.

KErickson
KErickson

Is there a version of Robocopy that works for Windows XP? Where can I find it?

jatwell
jatwell

We found that the Microsoft Robocopy GUI didn't meet our needs for using Robocopy for backup purpose so we wrote our own. Check out http://www.fetchsoftware.net/Software/RoboGui.html This application allows you to write extremely powerful batch files that use robocopy. We've been using it personally for years and decided to start sharing with others.

Barry 441
Barry 441

Looks more like XXCopy took Microsoft's idea. "Apparently, ROBOCOPY (which stands for Robust Copy) and XXCOPY both come from Microsoft's XCOPY utility as the basis for the overall approach which of course comes from COMMAND.COM's built-in COPY command." http://www.xxcopy.com/xxcopy30.htm

butkus
butkus

Was working find, but I didn't watch the whole thing on IE6.0

mplymale
mplymale

I'm also having a problem with the vidoe after about 2 minutes it stops.

Bill Detwiler
Bill Detwiler

With the launch of our new widescreen player, we also switched to a new method of delivering video, which should improve playback performance. Do you have trouble watching other videos? Are you still having trouble watching this video?

Mini Mal
Mini Mal

from what i can see it's a minor tweak over the XP version, which was itself a tweak of the NT4 version. a useful tip is to run it with /r:3 /w:5 /reg on first visit to each server you may log on to. that way if you miss similar parameters out of your batch files, it remembers these settings and doesn't re-try for 30'000'000 seconds per file !!

viveka
viveka

Microsoft has licensing terms on the utilities it provides. Can it be used in commercial deployments?

hbgoh
hbgoh

I believe what you are looking for is time machine is Mac OS X Leopard. After the initial setup with an ext hdd, it will automate the backup process each time you plug in the ext usb hdd or you can leave it plugged in and it will backup at set interval.

wodenickel1
wodenickel1

I think you are confusing the complexity of an rsync script with your comfort level on Win vs Mac! I use an rsync script which is also just a single command line, like your Robocopy script, to do the same thing - copy files to my external drive. Its no more complicated... just different. And BTW, I execute that script on my laptop from either Vista or Linux (its a dual boot machine). I created the script under LINUX then simply use it with a minor syntax change within CYGWIN on the Vista platform. But the bottom line is that the rsync script is not more complicated, it has equivalent but different options!! enjoy :) here is the one line command that archives my Thunderbird email directory on my E drive to my external USB connected F drive - but it could be ANY directory on any drive of course! /cygwin/bin/bash -c "/bin/rsync -rv --progress /cygdrive/e/thunderbird /cygdrive/f/"

markinct
markinct

Good video! I think there may be a typo in the slide when you talk about the number of retries and retry interval. I keep learning new things about Vista... after I'm 90-95% of the way coverted to Ubunutu... I keep Vista around for the one or two things my employer insists I use... And since it's already on my laptop I don't feel the need to rely on Wine...

headlesshorseman1
headlesshorseman1

Nice! Like finding an Easter Egg, but useful. As a fan of XXCOPY and XCOPY, both DOS executables and scriptable, it's nice to know that M$ is offering similar flexibility with ROBOCOPY.

Robert00
Robert00

A good tool but check out Robocopy's Wikipedia page and note the various limitations/problems with it.

Fagan
Fagan

Download Windows Server 2003 Resource Kit Tools from http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en and extract the files to a TEMP Folder, then move ROBOCOPY to \Windows\Systems32 and it will be available to the entire system. I use this setup for backing up WXPP & W2K & W2K3 Servers - works. Some brief documentation is here: http://support.microsoft.com/kb/323275. When you extract the ROBOCOPY files there is a ROBOCOY word doc with good documentation.

christop095
christop095

this is just what i needed right now! thank you very much!!!

lester
lester

Would MS have developed Robocopy if XXcopy hadn't been written?...who knows! Would MS have created Excel if Lotus123 hadn't existed? ... Who knows! I'm not saying they've been ripped off, just that it seems that they take a non copyrightable idea and develop it. Personally, I'll stick with XXCOPY as I still have a W98 machine and that allows my code to be consistent accross OSs and Robocopy doesn't offer me that much more functionality to force me to learn the different switches etc.

Editor's Picks