delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/02/13:47:36

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:subject:from:to:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=ydP
CeB3dy71rOE7AbZWsjlu2/CKOq34EwZ6NLdgKY72YiEXmxOggtjTmqGSvKc7xwqM
Ogh9DQq3bkKWLySr2yq2HJD/NL/3wooosAQUoeNO0Kx7p7kha1EGs8e0z1PA7DR0
FOQldtFzpG/etoagZK+gMi+u8R8E0vLDJAkguIBI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:subject:from:to:mime-version
:content-type:content-transfer-encoding; s=default; bh=DGhxkY16g
v4hHi0Go+QmF/Vcygs=; b=dTK3qJaGnPBwtPQhdehnImKJKEe5YlsxrWYqeMtXv
ohXFHYjODV6iwYIC8RfEoKwmTLM2DH/FWF09ORYOQydI8Sb59Sf1TRv/beG468nI
La9dRkHgovWFmecNR4VGsGvUAyUQQu228ZF9EFk5jHcuwdTg0CCanVs5XNqT+/dr
6g=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: lb2-smtp-cloud6.xs4all.net
Message-ID: <0216347cd127fa618050e7d72467a2e9.squirrel@webmail.xs4all.nl>
Date: Thu, 2 Apr 2015 19:47:15 +0200
Subject: Robocopy
From: "Houder" <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0

Hi Corinna,

Reference:
    https://cygwin.com/ml/cygwin/2015-04/msg00008.html
     - Re: Can I move Cygwin and Cygwin64 to a drive other than C: ?

Amazing that you had so much luck with robocopy ...

It did not surprise me, that it failed on me ...

Below 2 test cases: one using tar (success), the other using robocopy (failure).

(no worries: I will use tar)

Best regards,

Henri

@@# id # using an elevated shell (bash here, but the result is not different when using cmd)
uid=1000(Henri) gid=513(None) groups=513(None),1007(HelpLibraryUpdaters),544(Administrators),545(Users)
@@# mkdir /drv/d/d1 # testcase1 using tar
@@# mkdir /drv/d/d2 # testcase2 using robocopy

@@# pwd
/home/Henri
@@# cd /home
/home
@@# ls -l jvdwater/.bash_history # jvdwater is ANOTHER user, i.e. not Henri ...
-rw------- 1 jvdwater None 689 Nov 27 23:59 jvdwater/.bash_history

// test 1: -- success
@@# tar cf - ./jvdwater | ( cd /drv/e/d1; tar xpf - --same-owner )
@@# ls -l /drv/e/d1/jvdwater/.bash_history
-rw------- 1 jvdwater None 689 Nov 27 23:59 /drv/e/d1/jvdwater/.bash_history # Nice!

// test 2: -- failure
@@# robocopy $(cygpath -w /home/jvdwater) $(cygpath -w /drv/e/d2) /e /z /copyall /sl

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : Thu Apr 02 18:13:56 2015

   Source : E:\Cygwin\home\jvdwater\
     Dest : E:\d2\

    Files : *.*

  Options : *.* /S /E /COPYALL /Z /R:1000000 /W:30

------------------------------------------------------------------------------

                           7    E:\Cygwin\home\jvdwater\
            New File                 689        .bash_history
2015/04/02 19:13:56 ERROR 5 (0x00000005) Copying File E:\Cygwin\home\jvdwater\.bash_history
Access is denied.
Waiting 30 seconds... Retrying...
            New File                 689        .bash_history
2015/04/02 19:14:26 ERROR 5 (0x00000005) Copying File E:\Cygwin\home\jvdwater\.bash_history
Access is denied.
Waiting 30 seconds... <===== aborted with ctl-C

@@# // robocopy canNOT copy a file that cannot be accessed by Henri
@@# // ... even though he is using an elevated shell (bash or cmd) ...

----
http://stackoverflow.com/questions/24121046/difference-between-xcopy-and-robocopy
 - Difference between xcopy and robocopy

=====



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019