Solved

Xcopy not copying all the files

Posted on 2014-04-10
18
1,872 Views
Last Modified: 2014-04-12
Hi,
  I have a SBS2001 that has a lot of data files that I need to backup because I need to move these files to the new server(SBS2011).
  I attached an external USB hard drive to old server and ran XCOPY command.

  It is like this: XCOPY C:\ABC\*.*  F:\ABC  /c /d /i /e /y

  After XCOPY was done in command window, I realized that the files in USB backup hard drive has significantly less files than those on the file server.
   I went thru one folder at a time from the beginning and compared the number/size of original folder on the file server against that of USB hard drive and I found one/first folder that showed the difference in size/number.
   I used Windows Copy/Paste on that particular folder. After copying was done, I compared the size/number and they matched up.  But there are simply too many folders to go thru one at a time.
   I guess I can also do Copy/Paste the entire folder and do it that way too if that is more reliable.
   But I thought if you select & copy a root folder that has almost 100GB of files and try to paste, it may lock up the server due to heavy usage of memory ... that was just my guess.

   Do you know if there is an inherent issue/problem in XCOPY command? or Copy and Paste operation is better and accurate?
   
   ** Some may wonder why I did not choose Windows backup and Restore or why not put those two servers on the same network. First both servers have identical name and IP address. Second I wanted to copy as many files as possible in advance and paste them over to the new server so that on the day of deployment, I can simply copy "Changed or New" files using XCOPY command.
0
Comment
Question by:sglee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
  • 3
  • +1
18 Comments
 
LVL 22

Accepted Solution

by:
Rick Hobbs earned 178 total points
ID: 39992922
Try Robo copy it's free utility that will do a much better job for you and it'll only copy files it changed if you want.
0
 
LVL 22

Assisted Solution

by:Rick Hobbs
Rick Hobbs earned 178 total points
ID: 39992926
Also with Xcopy or not to be able to  copy open files
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 39992932
What is /d?  You should probably be using /H, also.  Are there hidden files?
0
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!

 

Author Comment

by:sglee
ID: 39992952
/d is date option. In other words, it will check the date of the file on both origin and destination folder. If both files have the same date/time, then it skips that file and move on to the next file in line. It saves the time.
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 39992961
Sorry, dumb question.  I knew it was for date, but I that you had to pass a value.  Didn't realize you could pass it with no value.  

Regarding hidden files?...
0
 

Author Comment

by:sglee
ID: 39992974
Regarding hidden files ...
When I found first folder with difference in numbers, there were just plain old files - Word/Excel/PDF. They were all visible in windows explorer.
0
 

Author Comment

by:sglee
ID: 39992979
"Also with Xcopy or not to be able to  copy open files"
Since I am copying these files at night, I don't have to worry so much about open files, but I know it is important...
0
 

Author Comment

by:sglee
ID: 39992982
Is there a danger using windows copy and paste on a folder that has about 100GB of folders and files inside - like server lockup or anything like that?
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 39992997
There shouldn't be.  My biggest concern would be slowness.  Windows will do "preparing to copy" crap indefinitely.  

If the server is stable, then it shouldn't have any issue.  I have copied several hundred Gigs without issue.
0
 

Author Comment

by:sglee
ID: 39993011
"preparing to copy" crap indefinitely ---> I hear you and I have it many times.
Well, the old server (SBS2003) is NOT SO stable and that is the reason for installing a new
server (SBS2011) and that was the reason I was trying XCOPY instead.
I thought XCOPY is a quite operation in command window.
Let me think about if I want to try Copy and Paste on 100GB folder.
0
 
LVL 9

Expert Comment

by:rfportilla
ID: 39993067
As mentioned by other expert, robocopy is a viable option.
0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 89 total points
ID: 39993103
Would just use robocopy too, I don't see why it wouldn't work with xcopy UNLESS maybe it had no rights to the files in a non-run-as-admin command prompt?   In cmd.exe window can you see them, and copy / open them?

robocopy /mir \\oldserver\share D:\folder\on\new server


Steve
0
 

Author Comment

by:sglee
ID: 39993164
Currently running Copy & Paste on 100GB folder. Let's see  how it goes.
If Copy & Paste is successful, then I will copy the files from old server into the new server.
When I am ready to replace old server with new server, then I will simply use ROBOCOPY to copy only NEW & Modified files.

Does this command compares the date/time of each file and skip them if they are the same? I am only interested in copying new & modified files.

robocopy /mir \\oldserver\share D:\folder\on\new server

Xcopy will check the date/time with /D and only copy new and modified files.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39993403
robocopy is better than that, with /mir it will copy the files that have changed only AND remove any files from the destination that have been deleted from the source too, i.e. make them the same.

millions of options on roboocopy and maybe you need permissions, copied, or maybe not etc.  on mobile at moment but if unsure of which combinations to use, just ask.
0
 

Author Comment

by:sglee
ID: 39993980
This time I just used windows Copy & Paste (one chunk of folders at a time) and it worked. They match up now.

I also tried Robocopy and I can see the benefit of it and I will use it moving forward.

Thanks for your help.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39994225
Sure.  Robocopy is great for migrating data over between boxes etc. as it can just be re-run. "Richcopy" is a GUI robocopy-like free MS tool too, though a bit old now, and robocopy is built into the OS With 2008/Win7 etc.

Steve
0
 

Author Comment

by:sglee
ID: 39994268
How can I get robocopy installed on windows 2003 server?
0
 
LVL 9

Assisted Solution

by:rfportilla
rfportilla earned 88 total points
ID: 39995663
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Learn about cloud computing and its benefits for small business owners.
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

617 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