Using xcopy for backup

  • Thread starter Thread starter Don Culp
  • Start date Start date
D

Don Culp

I'm trying to use xcopy from a batch file to back up drive d to drive j
(both local drives). The command is:

xcopy d:\*.* j:\backup\*.* /s /h /e /v /d

However, this gives an error message:

Can't read file: "\System Volume Information"

and aborts without copying anything. ("System Volume Information" is a
folder in the root folder of d. The Security for this folder is set to allow
reading it.)

I attempted to exclude "\System Volume Information" during xcopy with the
following command but still get the same results:

xcopy d:\*.* j:\backup\*.* /s /h /e /v /d /exclude:"\System Volume
Information"

I realize that I could put everything that I want to backup on d: into a
single folder and then backup only that folder but I would prefer not to do
this. Also, the batch file has commands to backup other parts of my system
(in addition to drive d:) so I'd prefer not to abandon this batch file.

Thanks for any suggestions.

Don Culp
 
Don Culp said:
I'm trying to use xcopy from a batch file to back up drive d to drive j
(both local drives). The command is:

xcopy d:\*.* j:\backup\*.* /s /h /e /v /d

However, this gives an error message:

Can't read file: "\System Volume Information"

and aborts without copying anything. ("System Volume Information" is a
folder in the root folder of d. The Security for this folder is set to allow
reading it.)

I attempted to exclude "\System Volume Information" during xcopy with the
following command but still get the same results:

xcopy d:\*.* j:\backup\*.* /s /h /e /v /d /exclude:"\System Volume
Information"

I realize that I could put everything that I want to backup on d: into a
single folder and then backup only that folder but I would prefer not to do
this. Also, the batch file has commands to backup other parts of my system
(in addition to drive d:) so I'd prefer not to abandon this batch file.

Thanks for any suggestions.

Don Culp

I recommend you keep things simple: Instead of excluding certain
folders, just tell xcopy to continue, regardless of errors. If you don't
then xcopy might get stuck with other issues, e.g. locked files. Note
the switches I added, and note that the destination should NOT
have any wildcard characters.

xcopy d:\*.* j:\backup\ /s /h /e /v /d /y /c
 
Pegasus said:
I recommend you keep things simple: Instead of excluding certain
folders, just tell xcopy to continue, regardless of errors. If you don't
then xcopy might get stuck with other issues, e.g. locked files. Note
the switches I added, and note that the destination should NOT
have any wildcard characters.

xcopy d:\*.* j:\backup\ /s /h /e /v /d /y /c
Should /m be used so files don't get backed up again unless modified?
 
Stubby said:
Should /m be used so files don't get backed up again unless modified?

The /m switch is appropriate if you're backing up to a different target
folder each time.

Since you're backing up to the same target folder, you should use the /d
switch.
 
"Exclude" points to a text file containing a list of the files to exclude.
 
Pegasus (MVP) said:
The /m switch is appropriate if you're backing up to a different target
folder each time.

Since you're backing up to the same target folder, you should use the /d
switch.


What does the /d do? I have only ever used /d:date.
Stan
 
Stan said:
What does the /d do? I have only ever used /d:date.
Stan

Leaving the date blank only copies newer, please enter XCOPY /? on
command line to see explanation.
 
Bob said:
Leaving the date blank only copies newer, please enter XCOPY /? on
command line to see explanation.

Thanks, that is good to know.
Stan
 
You're welcome


You might want to try XXCOPY instead of the XCOPY program provided by
Microsoft. XXCOPY is feature-rich, and has a /CLONE parameter which makes
backups really easy.
 
Jay said:
You might want to try XXCOPY instead of the XCOPY program provided by
Microsoft. XXCOPY is feature-rich, and has a /CLONE parameter which makes
backups really easy.

No thanks, XCOPY works just fine for my purposes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top