"Device or resource busy" during read (rsync)

Mikhail Usenko mikeus@nm.ru
Sun Dec 22 17:55:00 GMT 2013


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



More information about the Cygwin mailing list