bat file problem running xcopy  | |
November 4th, 2008, 03:56 PM
|
#1 (permalink)
| | Junior Member
Join Date: Nov 2008
Posts: 6
| bat file problem running xcopy
Hi, I'm running an XCOPY command within a bat file. The XCOPY takes several hours to run, lots of large files. Once it gets to the XCOPY, it copies all the files, but it does not continue to the next line in the bat file. It just stops. Any idea what is going on? Is there some sort of timeout? This is on a Windows 2000 server. The command looks like:
xcopy /O /Y E:\aaa\bbb\*.* E:\ccc\ddd\data 1>> E:\backup\log\backup_log.txt
Again, all the files are copied, but it doesn't execute the next line which is
echo . >> E:\backup\log\backup_log.txt
Any ideas? |
| |
November 4th, 2008, 05:53 PM
|
#2 (permalink)
| | Ride 'em Cowboy
Join Date: Oct 2001 Location: Dallas, TX
Posts: 8,698
|
Not sure what you >> are suppose to do....The following should work.
ECHO E:\backup\log\backup_log.txt
__________________ Have you hugged your kid today?? |
| |
November 5th, 2008, 09:26 AM
|
#3 (permalink)
| | Junior Member
Join Date: Nov 2008
Posts: 6
|
does anyone know if there is a problem with bat files timing out? When I do the XCOPY, it takes about 4 hours. I am thinking that maybe the bat file times out and execution never returns to process the next few lines in the bat file. |
| |
November 5th, 2008, 09:39 AM
|
#4 (permalink)
| | Ride 'em Cowboy
Join Date: Oct 2001 Location: Dallas, TX
Posts: 8,698
|
I don't see how it can time out if you're getting all the files copied.
Could you live without the /O switch?
Approx how many files and what is the total size?
You might want to research RoboCopy that ships with Vista. It's much more powerful. You can get it as part of the tools here or copy it off a Vista machine: Download details: Windows Server 2003 Resource Kit Tools |
| |
November 5th, 2008, 09:47 AM
|
#5 (permalink)
| | Junior Member
Join Date: Nov 2008
Posts: 6
|
there are 71 database files, total of 14 gig. I'm thinking of adding the /C switch. Maybe there is some sort of error (although all the files are being copied)? I'd like to retain the /O switch since this is a database backup, unless there is some reason that I should drop it. |
| |
November 5th, 2008, 10:01 AM
|
#6 (permalink)
| | Ride 'em Cowboy
Join Date: Oct 2001 Location: Dallas, TX
Posts: 8,698
| robocopy, or "Robust File Copy", is a command-line directory replication command. It was available as part of the Windows Resource Kit, and introduced as a standard feature of Windows Vista and Windows Server 2008.
Robocopy is designed for reliable mirroring of directories or directory trees. It has features to ensure all NTFS attributes and properties are copied, and includes additional restart code for network connections subject to disruption. Robocopy is notable for capabilities above and beyond the built-in Windows copy and xcopy commands, including the following:
Continued here: robocopy - Wikipedia, the free encyclopedia |
| |
November 5th, 2008, 10:30 AM
|
#7 (permalink)
| | Junior Member
Join Date: Nov 2008
Posts: 6
|
is robocopy any faster than xcopy? |
| |
November 5th, 2008, 12:49 PM
|
#8 (permalink)
| | Ride 'em Cowboy
Join Date: Oct 2001 Location: Dallas, TX
Posts: 8,698
|
I've never used it. But "Robocopy is notable for capabilities above and beyond the built-in Windows copy and xcopy commands"
sure would motivate me to at least try it.
You could do a test run with a small group of files. |
| |
November 5th, 2008, 02:14 PM
|
#9 (permalink)
| | Caveat Emptor
Join Date: Mar 2005 Location: Out of my mind
Posts: 3,232
|
4 hours? 14 gigs? I take it you're not on a gigabit network LOL...my in-house moves 20 gigs in about 8 minutes!!!  |
| |
November 6th, 2008, 12:10 PM
|
#10 (permalink)
| | Junior Member
Join Date: Nov 2008
Posts: 6
|
Well actually ...., the entire script takes about 4 hrs and it shuts down lots of services including the Oracle Database. I'm not sure how long the copy piece takes. I'll have to put a time in the script. This is an old HP server, Proliant DL380 G3. The drive is an internal logical (partitioned) COMPAQ SCSI drive. But the copy is probably taking longer than normal because it's being copied to a compressed folder, which adds some overhead. |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |