| delorie.com/archives/browse.cgi | search |
| 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:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=XEzsuKAWO8HenQzxKSxKs6o0QHDHLypYZDieYN6OcrkAoDBomLXYY | |
| eEfAt/hdB9rAby3F1eNe8I/9KQVYmp+qDMiZ78fNOtSE4AyTPnhHl08y9NkI+Hjq | |
| Tr0JVFwvuAzRR0T1faK2lNwTN/sF4R5E0dZcp3ffiobk8+veDfwiEY= | |
| 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:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=RdHZD0axHueaK2x9rchtChzqK5k=; b=lGmyG263rhL01gR4tMKy8H1sRJHg | |
| uotJyJICRipS9XT0f8EwsmoG/LhA2gT58aZAvGpZeoON71jrdtVjK6vlpQmkU4lW | |
| WwswH+s9dCAm6falHoTJJWP/2p6i7XSKvpEVnOmqqGbWjnWuxm0mSVFqx+oTZcQY | |
| qTMuqhvwJBtdHnc= | |
| 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 autolearn=ham version=3.3.2 |
| X-HELO: | calimero.vinschen.de |
| Date: | Mon, 23 Dec 2013 10:36:18 +0100 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: "Device or resource busy" during read (rsync) |
| Message-ID: | <20131223093618.GA19257@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <C14924774373A047BE1F8EF948922F493EEF3E6A AT UM-MBX-T03 DOT um DOT umsystem DOT edu> <20131222215504 DOT d590c9d0fad214acdeaf6bf5 AT nm DOT ru> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20131222215504.d590c9d0fad214acdeaf6bf5@nm.ru> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Dec 22 21:55, Mikhail Usenko wrote:
> On Sun, 22 Dec 2013 00:02:10 +0000
> Winkel, Richard J. <...> wrote:
>=20
> > I have a hard time believing this is an unusual question but I swear=20
> > I've been googling everywhere without an answer! :)
> > I'm using rsync (under cygwin) to backup windows servers to a linux box=
=20
> > and it's working wonderfully, except that if a file is open rsync can't=
=20
> > access it even for reading. I know some windows-based backup programs=
=20
> > don't have the problem so I'm hoping there's some way to avoid it in=20
> > cygwin. I've looked at the cygwin mount options but don't see anything=
=20
> > obvious. Is there a way around it?
>=20
> Hello, Richard
> You need to use VSS which stands for 'Volume Shadow copy Service' (or 'V=
olume Snapshot Service') on Windows. It is based on copy-on-write technolog=
y below the NTFS level and is used by Windows to make backups of the runnin=
g system including of opened and locked files. (Also VSS utilizes a number =
of 'writers' that helps to make a consistent backup of opened database file=
s for instance.) The shadow copy may be created by using different userspac=
e tools:
> * vshadow.exe (http://msdn.microsoft.com/en-us/library/bb530725(VS.85).as=
px)
> * vssadmin.exe (on the server OSes)
> * wmic.exe
> * by calling COM WMI objects from windows script host (http://support.mic=
rosoft.com/kb/188135) - VBA or JS scripts or from Windows PowerShell script=
s.
>=20
> The easiest way to access the created shadow snapshot:
> http://blogs.msdn.com/b/adioltean/archive/2008/02/28/a-simple-way-to-acc=
ess-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 HarddiskVolumeShad=
owCopy{0f7ef985-69b8-11e3-8264-ccdf67e6642d} -> /proc/sys/Device/HarddiskVo=
lumeShadowCopy2
brwxrwx--x 1 Administrators SYSTEM 0, 250 Dec 23 10:32 HarddiskVolumeShad=
owCopy2
$ 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
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--T4sUOijqQbZv57TR
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAEBAgAGBQJSuAQSAAoJEPU2Bp2uRE+g/goP/2V/bQhWVG74SnPghCW0Mfnk
Lr5o0WrIF/cACEss46XMntvRmIpdlI4IYUpxtcexoHqQP5SIehgXDFai3NbNq7yG
IOTy20Cc6dWnIHGyMkjz0q7XQNwVTG6xccroI5L4uAGwhIDcqP6hy6TogEZJIShn
jGnnlLn2jqpPd0ZlPVRb6oSQpGtQARJpN0k0TeVn9u5Huf3DfKYxrGJbMgD4U01G
yQpwr/tKCrxKz/FSUFsUgtbq1yVl8AxYVEHhdR7XvgHA1Gd7Uco5NyuEiAsqF5CX
FHe6gmAr15HvzATObWbmQbb0lqdY3h07uowawivc5K0NA+fXEfbRERWfbkrZxKKj
n5RqF8dYSnkrTJSFLE02Ywo6VtN8yqBZyio6qbmNSfxdZUHandSJRs3A7ZaOYM2Y
CI8iOAGaZGSy05YpE8FH3UIGSJuzGSihHcUhTsvLvfumwxnb9RzhT/7H6TS3YYF6
YEbekWdAY658tFleWok+1ksj5eJAPFiOde5fvLXH2wjmceN5WOu0O4wZoNru8gJX
OJYivb6pyQAzJHzI0sP5GRvDOqPARrvFusyJA0pCPVnTwnXjBMgDcS5hvQBw0xG8
Y2uO6NaN81Dg8P8zzE31GbMKm5EX82tH5ciV9AEXF2tgTZe6gIJpE7cFGr4hAB+O
i729L941bX7w7HmeWboJ
=rd6d
-----END PGP SIGNATURE-----
--T4sUOijqQbZv57TR--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |