Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


December 12, 2007

Xbackup.cmd

Use Xcopy to create a simple backup script
RSS
View this exclusive article with VIP access -- click here to join |
See More Backup and Recovery Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

 Executive Summary:
Although the Xcopy command isn’t a substitute for a real backup solution on a network, you can use Xcopy to create a simple backup script that provides basic insurance to prevent data loss on systems where user-critical data isn’t already protected by backup infrastructure.

Do you need a fast, effective, no-frills tool for performing manual backups? Xcopy, which is one of the oldest tools around, is very effective. The trick is in knowing how to use Xcopy correctly as a backup tool. In this article I explain how to use Xcopy as a simple backup tool, including when to use particular options. I also discuss how to determine whether Xcopy is the right tool for your backup needs.

For the purposes of our discussion, let’s assume that you need to back up user data files on a PC on which the system and user files are on drive C, and that you're backing up to an external USB drive that has drive letter E assigned to it. You want to capture data for all your users. I’ll show you how to create a clean and simple command shell script that works for most systems. . . .

Reader Comments
Don't know about xcopy but robocopy (from MicroSoft) has a nice retry feature if network connectivity is temporarily lost you can set how many times to retry and resume where it left off.

lbutchk December 12, 2007 (Article Rating: )


I recommend using the /f (verbose), /e (all sub-directories) and /h (hidden files) as well.

I usually use (from the source folder

xcopy /f /d /e /h /y /c .\* <destination>

Just a suggestion. Xcopy should live forever. At least now I know I am not the only one doing backups with it.

Nice work.

arztje December 21, 2007 (Article Rating: )


lbutchk: Robocopy is now integrated into Windows (as of Vista). Although my approach was based on using an easy, already-there tool, I love using robocopy. It makes life much easier. Unfortunately it isn't a separate download from Microsoft, but people can get it from the 2003 RK tools:
http://www.microsoft.com/downloads/results.aspx?freetext=robocopy.
arztje: A funny thing about those hidden files. I usually use that as well, but I found it to be a disaster for end user backups. The problem was the user filesystem backup always got their Temporary Internet Files and standard temp files as well. This meant that users who didn't pay close attention to their PCs - the ones most at risk in a decentralized environment - got lots of garbage in their backups. Worse, the longer backup times meant they didn't bother running it as often. :s
When I switched to not backing up hidden files, it turned out that the losses generally didn't matter to people. They were still getting the items that were personally important to them. Ironically, even though it makes some recovery tasks much more difficult, the increased likelihood of doing the backups meant that the things users worry about - documents (and photos/music/video, even though it isn't business-related...) - were very likely to be in good shape. Of course, if you're less lazy than me, you can use an exclude file as well to rip out the Temp folder and Temporary Internet Files. :)

AlexKAngelopoulos January 02, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Learning Path WINDOWS IT PRO RESOURCES
"File-Server Migration: Scopy Becomes Xcopy"


Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...


Related Articles File-Server Migration: Scopy Becomes Xcopy

Related Events Virtualization Management

Virtualization 101

Creating the Business Case for Disaster Recovery Planning and Budgeting

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing