0

LAST-UPDATED: 20161204@144548

STATEMENT: "After quite some time of the first initial post, a suggestion was made to use Bash-cp. So, that means the method of using the 1-line command robocopy would be disregarded at this point. But, IDK how to use Bash-cp and confused on that process."


I'm using robocopy to do a manual backup of drive1 to drive2. The only problem is that after doing the backup the 2-drives appear different in file-size (huge, difference is by GB's).

According to the log-file, there are failed attempts. I have files in-use so the process is terminated and can't get past it even after re-trying. Contrary to belief, to "skip" this you have to define /R: & /W:.....this isn't the case for me at all. The process is instead terminated and not able to get past it.

So below is how i've structured the robocopy command and please see what needs to be modified to ensure that all files are being properly carried over and the end result is having both drives be identical in size and file-integrity.

PROBLEM

  1. Source / Destination file-size differ in size after doing a robocopy /MIR backup.
  2. When a file is in-use, robocopy fails to continue the backup process (or more-so bypass it) and have it be completed. The error message(s) for this is (is as follows):

The process cannot access the file because it is being used by another process.

ERROR: RETRY LIMIT EXCEEDED.

  • File size difference (37GB missing)
    • Drive1 (source): 311gb / 465GB
    • Drive2 (destination): 274gb / 465GB

MY CONFIG

RAW

robocopy F:\ E:\ /MIR /SEC /SECFIX /TEE /V /R:1 /W:1 /MT:20 /NFL /NDL /XD $RECYCLE.BIN "System Volume Information" /LOG+:"%tmp%\backup.log"

PARAMETERS (explained)

[METHOD]
  /MIR           : [BACKUP-METHOD] as mirror-match, automatically Purges including subdirs even empty as typical.
[NECESSARY]
  /TEE + /V      : verbose-output, see the process of what's going on via console-window
  /R + /W        : no. of Retries & Wait-time, useful for taking a pause during verbose-output to read errors
[EXTRA]
  /SEC + /SECFIX : copy files w/ SECurity & to fix them even skipped files
  /NFL + /NDL    : shorten verbose-output, used to only display changes to make it way easier to spot errors
  /XD            : exclude dirs, in this case the recycle-bin to prevent copying major files that have been deleted and no longer necessary

SOLUTION

  • none-so-far

NOTE

  • What is Robocopy (Windows-only command)? A tool used to make backups. Superseding the older copy (command). By default Robocopy will only copy a file if the source & destination have different time stamps or different file sizes. In contrary, it's better to use copy for single-files that are hidden (files that begin with a ., e.g. .vimrc or _vimrc).
  • Instead of manual backups why not just invest in a RAID1 drive configuration? The flexibility of having an open drive to witness and see for yourself the backups being made is so much less of a hassle than it is to set & forget on a RAID1 setup.
  • DO NOT suggest using /R: & /:W: as i've already explained it doesn't work, it prevents the process from getting past it. Because, all it really does is stop the robocopy-command to prevent a never ending halt.
  • Off topic, but perhaps a better solution/option (I have found for myself) is just use Bash on Windows and the cp -ra command...if you prefer – ThisIsNotMyRealName Nov 19 '16 at 6:06
  • Hmm, isn't cp (copy) a Linux-command? I've even verified it by trying it within cmd > cp then came an unrecognized file error-message. So this copy command works if I set it up using Bash? I've never done that before and I'm more fond of documented 1-line commands NOT Bash. I wouldn't even know where to begin. – fohrums Dec 4 '16 at 4:40
  • 1
    Hey Forums, on windows 10 bash is a feature you enable via control panel! Plus in bash 'man cp' will give you a detailed manual. Much better documentation than windows commands in my opinion :) – ThisIsNotMyRealName Dec 4 '16 at 4:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.