Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  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. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
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 be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? 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 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Related Articles File-Server Migration: Scopy Becomes Xcopy

Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Backup – The Backbone of Your Business

Disk-to-Disk Grows Up

Effectively Shrinking Your Backup Window – with CA ARCserve Backup Data De-duplication and the Riverbed Steelhead Appliance

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 Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


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 DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement