[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


While backing up a machines C drive what are the folders that need to be backed up.

Posted on 2007-07-27
Medium Priority
Last Modified: 2012-05-05

While backing up a machines C drive what are the folders that need to be backed up.
Favorites,Desktop,NK2 files,pst what else.
So i need a script which will back all these up on one click to the same or remote machines folder.

Question by:bsharath
  • 4
LVL 32

Accepted Solution

r-k earned 2000 total points
ID: 19583867
I would suggest that instead of trying to see what folders need to be backed, you should make a list of what should _not_ be backed up.

Here is the simple script I use:

xcopy c:\*.* /s/e z:\ /c/f/h/d/y/o /EXCLUDE:exclude.txt

This backs up the entire c: drive to the z: drive (which could be a mapped network drive), except for files/folders specified in the file "exclude.txt"

At present I have the following items in the exclude.txt file. You can add or subtract of course:

\Temporary Internet Files\
\System Volume Information\
\Program Files\

(Items in \...\ are folder names, the rest can be files or folders)

Here is am explanation of the flags used with xcopy:

Rem       /s  means all subdirectories also
Rem       /e  means empty folders also
Rem       /c  means ignore errors
Rem       /f  means full display in console window
Rem       /h  means hidden files also copied
Rem       /d  means copy only those files that have changed
Rem       /y  means do not prompt for overwriting existing files
Rem       /o  means retain file ownership and acl info

Note that only files that have chamged since the previous backup are copied the next time (due to the /d flag)

You can create two small files, one called (e.g.) backup.bat in which you put the xcopy command, and the other exclude.txt. Then you can do the backup whenever you want by double-clicking on the backup.bat file, or even schedule it for automatic backups every night.

And be sure to test things are working before trusting any backup scheme.

LVL 12

Expert Comment

ID: 19583909
One could argue, that for a simple desktop you just need to backup C:\Documents and Settings, since most apps need to be reinstalled anyway, and in the event of a disaster recovery you will likely be doing a format reinstall.
LVL 32

Expert Comment

ID: 19583923
"that for a simple desktop you just need to backup C:\Documents and Settings"

True, but over time I discovered that many people end up creating data and document folders in all sorts of new places outside the "documents and settings" tree. In most cases this is impossible to predict in advance, hence my suggestion to back up everything but the obvious folders such as "Windows" and "Program Files"

Just to be sure, my suggestion is for XP, folder names are different for Vista, or 2000.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 70

Expert Comment

ID: 19584077
One problem in using XCOPY (or ROBOCOPY for that matter) is that it will not copy open files. You would be better off running WIndows Backup on the local machine, that will copy open files and you can also include the system state.
LVL 32

Expert Comment

ID: 19585094
Yes, good point about open files. If using xcopy it is good to close other open applications. I like and use NTbackup, however for convenience and ease of use and recovery it is hard to beat xcopy. It just sounds more like what the asker had in mind, but NTbackup should definitely be considered.
LVL 32

Expert Comment

ID: 19588811
Thanks and good luck.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is my 3rd article on SCCM in recent weeks, the 1st (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html) dealing with installat…
On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question