delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/12/23/10:43:48

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; q=dns; s=default; b=ihOicntAUIbfnuxLppIlLClxzuxC7
yBiCxLnRa2pQfc+KtYQ2tz7cd6r3t36SY1K5/0FgP095SFao7Iau0CCxRp8UVYOH
towlaGSKce0XSA/ebRtvwxIGRllAE7KPWZfmxr1Bxak2TAKuzGLumFkiOJqJEsYK
DZohDiJ+TnRTrI=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; s=default; bh=+AnrTQUEPG/8fS21vOxN6tmqMwc=; b=jfp
ti02pJsa2A/c6+YBIE8RJsNZxAw/Loj3XvT2mziu2M1PMaYFnC5fNQrs46BHHEYc
bWh9YcpHWaXSD0y7BYKKYmqbY+HNRoHSGpnwNdYGnlwvQmH542EJm8d6PkSOzi8J
hMzpx9ZtGMUBrqY1cqJVORX0XrmevzC4hRxZbAX8=
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.9 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mst-rip6-missouri-out.um.umsystem.edu
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ah4FAERZuFLPoJ7U/2dsb2JhbABRAgaDCzhVgwG2PxiBBBZ0giUBAQEEIwQNRBECAQgYAgIFFgsCAgIHAwIBAgEgFQIBDQIEDQQEAogADbE5k02FexeBKY0RFRMQGCKCboFIBJgXgTCQZIMtQIFq
X-IPAS-Result: Ah4FAERZuFLPoJ7U/2dsb2JhbABRAgaDCzhVgwG2PxiBBBZ0giUBAQEEIwQNRBECAQgYAgIFFgsCAgIHAwIBAgEgFQIBDQIEDQQEAogADbE5k02FexeBKY0RFRMQGCKCboFIBJgXgTCQZIMtQIFq
From: "Winkel, Richard J." <winkelr AT missouri DOT edu>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: "Device or resource busy" during read (rsync)
Date: Mon, 23 Dec 2013 15:43:25 +0000
Message-ID: <52B85A1C.3020504@math.missouri.edu>
References: <C14924774373A047BE1F8EF948922F493EEF3E6A AT UM-MBX-T03 DOT um DOT umsystem DOT edu> <20131222215504 DOT d590c9d0fad214acdeaf6bf5 AT nm DOT ru> <20131223093618 DOT GA19257 AT calimero DOT vinschen DOT de>
In-Reply-To: <20131223093618.GA19257@calimero.vinschen.de>
user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id rBNFhi85008390

Wow, thanks so much to both of you! This is a HUGE help.   I really 
appreciate your time.

Take care,
Rich

On 12/23/2013 03:36 AM, Corinna Vinschen wrote:
> On Dec 22 21:55, Mikhail Usenko wrote:
>> On Sun, 22 Dec 2013 00:02:10 +0000
>> Winkel, Richard J. <...> wrote:
>>
>>> I have a hard time believing this is an unusual question but I swear
>>> I've been googling everywhere without an answer!  :)
>>> I'm using rsync (under cygwin) to backup windows servers to a linux box
>>> and it's working wonderfully, except that if a file is open rsync can't
>>> access it even for reading.   I know some windows-based backup programs
>>> don't have the problem so I'm hoping there's some way to avoid it in
>>> cygwin.  I've looked at the cygwin mount options but don't see anything
>>> obvious.  Is there a way around it?
>> Hello, Richard
>> You need to use VSS which stands for 'Volume Shadow copy Service' (or  'Volume Snapshot Service') on Windows. It is based on copy-on-write technology below the NTFS level and is used by Windows to make backups of the running system including of opened and locked files. (Also VSS utilizes a number of 'writers' that helps to make a consistent backup of opened database files for instance.) The shadow copy may be created by using different userspace tools:
>> * vshadow.exe (http://msdn.microsoft.com/en-us/library/bb530725(VS.85).aspx)
>> * vssadmin.exe (on the server OSes)
>> * wmic.exe
>> * by calling COM WMI objects from windows script host (http://support.microsoft.com/kb/188135) - VBA or JS scripts or from Windows PowerShell scripts.
>>
>> The easiest way to access the created shadow snapshot:
>>   http://blogs.msdn.com/b/adioltean/archive/2008/02/28/a-simple-way-to-access-shadow-copies-in-vista.aspx
> You can access the shadow copies in Cygwin via /proc/sys:
>
>    $ cd /proc/sys/Device
>    $ ls -l HarddiskVolumeShadowCopy*
>    lr--r--r-- 1 Administrators SYSTEM      0 Dec 23 10:32 HarddiskVolumeShadowCopy{0f7ef985-69b8-11e3-8264-ccdf67e6642d} -> /proc/sys/Device/HarddiskVolumeShadowCopy2
>    brwxrwx--x 1 Administrators SYSTEM 0, 250 Dec 23 10:32 HarddiskVolumeShadowCopy2
>    $ cd HarddiskVolumeShadowCopy2/
>
> Note the trailing slash in the last cd command!  It's required due to
> the dualism of the HarddiskVolumeShadowCopy2 entry, being a device *and*
> the root dir of a drive.  ANyway, after this, you can access the shadow
> copy just like your normal drive:
>
>    $ ls
>    $Recycle.Bin            hiberfil.sys         swapfile.sys
>    bootmgr                 pagefile.sys         Symbols
>    BOOTNXT                 PerfLogs             System Volume Information
>    Config.Msi              Program Files        Users
>    cygwin                  Program Files (x86)  Windows
>    cygwin64                ProgramData
>    Documents and Settings
>
>> Then rsync can be used to copy files from the shadow snapshot after which the snapshot can be deleted.
> Right.
>
>
> Corinna
>

- Raw text -


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