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:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=F5UUgV1KBPaJQ3Ib58bYZ10OV3mejBxL54cnnKO30Lr EuKY2r6jAvPBWSgA2UaOAWiNYLkx27rp1lldEhThw5yW8tYVpOtxY4xVLnTPQGMr qGEAjtbl0rkMJ5Zw1uFn/72cXjfLxuiwr8rxruOWvAUrn5PRWfcW+xW2/Oq3zon8 = 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:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=8CSullMu1bsII8leQWLMmhR8w6s=; b=TtoOcybFheFXsuir5 5Vc4WxoghtkLGpVIeYz9sh6js1nUJzYA5VPefaB/Zf/FbzeM/mFrZVdqIxurYktX Ifk+oi4MoXVCVUI5kNx7hT4/Dw5aCkAKAm6tR5B/B/OnaYZlXsY29aU5Sa5lVJMU 8yntq55GHi0kRHpG2gXpfky69Q= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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: Yes, score=6.6 required=5.0 tests=AWL,BAYES_40,DNS_FROM_AHBL_RHSBL,RCVD_IN_PSBL,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail3.ks.pochta.ru Date: Sun, 22 Dec 2013 21:55:04 +0400 From: Mikhail Usenko To: cygwin AT cygwin DOT com Subject: Re: "Device or resource busy" during read (rsync) Message-Id: <20131222215504.d590c9d0fad214acdeaf6bf5@nm.ru> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RSpam-Score: 30 X-RSpam-Report: This message is unlikely spam. X-IsSubscribed: yes 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 Then rsync can be used to copy files from the shadow snapshot after which the snapshot can be deleted. I believe there are already working solutions and programs that can be found. For example these articles: http://users.softlab.ntua.gr/~ttsiod/win32backup.html http://blog.jay2k1.com/2011/08/13/how-to-create-rsync-like-hard-link-backups-with-vss-on-windows/ If you will find something satisfactory for you, please let me know. -- -- 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