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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1383
  • Last Modified:

Robocopy is copying empty files. Why? How do I fix it?

I ran Robocopy to migrate data from a Drobo NAS device to a Dell Server running Windows Server 2012 R2.  The Server has Direct Attached Storage and a large volume created to share the files.  

I used the following command:
robocopy "T:\" "X:\Media" /E /ZB /R:5 /COPY:DAT /PURGE /X /TEE /LOG:"C:\RobocopyLog.txt"

The destination files all show the file size under size (i.e. 27.9 MB) but under Size on disk they say 0 bytes.  Server 2012 shows very little data on the volume (110mb).  

Remote access of the files on the destination server result in error messages about corrupt files.  

I don't understand showing size accurately, but size on disk showing 0 bytes.  Also, it's taking days to copy the data, so it's not like it's quickly copying 0 bytes.

For whatever it's worth I have dedup set up on the destination Volume.
0
Taylor Huckstep
Asked:
Taylor Huckstep
  • 5
  • 2
2 Solutions
 
Miguel Angel Perez MuñozCommented:
Could you check user used to run command has enough privileges? (minimal read only on origin and write on destination).
0
 
becraigCommented:
Is the robocopy job complete or still in progress ?

It is quite possible the copy job is not yet complete.
0
 
Taylor HuckstepSenior Director, ITAuthor Commented:
Job completed, and filled the drive with 0 files.  I'm logged in as Administrator.

I just don't understand how it can copy a file that takes up no space, but reports its original size.  Maybe COPY:DAT copies the file size metadata or something.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Taylor HuckstepSenior Director, ITAuthor Commented:
This is what I'm seeing.  Complete files that take time to transfer, but have nothing in them:
http://i58.photobucket.com/albums/g277/tayhuck/2014-08-28_210605_zpsf20bcdad.jpg
0
 
Taylor HuckstepSenior Director, ITAuthor Commented:
Still not sure why or how it was taking forever to copy files with 0 bytes on disk, but this command ended up properly copying for me:
robocopy "T:\" "X:\Media" /E /V /ZB /R:5 /W:30 /TEE /LOG:"C:\RobocopyLog.txt"
0
 
becraigCommented:
So I am guessing this is what happened:
/purge
Deletes destination files and directories that no longer exist in the source.

There may have been some aberrant behavior with the purge flag.

In the future take a quick look at all the flags to verify which you want to use:
http://technet.microsoft.com/en-us/library/cc733145.aspx
0
 
Taylor HuckstepSenior Director, ITAuthor Commented:
Yeah, I had that thought too.  Thanks to all for your comments.
0
 
Taylor HuckstepSenior Director, ITAuthor Commented:
I added my command string to the solution as that fixed the original problem.  I think becraig had it right with the /purge option.

I was trying to mirror up source and destination, including the removal of nonexistent folders, hence the /purge flag.  If /purge was causing the problem, it wasn't because the string was acting as its supposed to.

I wanted to do a migration, then resync after a period of time, just the changes, including removal of any deleted folders and data from the source.

My string I used, only copies from source, it doesn't sync.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now