open files

Tarun Karra tarun820 at yahoo.com
Mon Feb 23 01:49:37 GMT 2004


hi,
>Well apart from being kludge, there is some merit to the Windows solution.
>I'm not sure what exactly you are referring to with "backup semantics", but
>I've understood ntbackup.exe on W2k or newer uses reparse points for backing
>up files. That way it is not only capable of reading files that are open for
>writing, but also gets a (somewhat) consistent snapshot of the files that
>are written to. 

>For example, Outlook likes to create mailboxes that are ~1GB. Rsyncing them
>takes a considerable amount of time. During that time, Outlook may write all
>over the file which mean the rsync's backep up version will be hugely
>inconsistent. With a reparse point, the backup file will be a snapshot of
>one point of time -- Outlook may have been in the middle of writing
>something, but the the situation is similar to a sudden powerloss, and
>Outlook has much better chance at recovering.

>So do you reparse points by "backup sementics" or "just" being able to read
>every open file (backup capability)?
 
I dont know about reparse points but.. I know some thing that works like this. Probably you guyz know this "St Bernard open file manager". I installed the trial version of this software on my windows box and mirrored the whole of  C DRIVE. And Rsync mirrored each and every file inlcluding open files. I also read a while paper about how this works on the stbernard site and it said some thing similar to reparse points.
 
Hope this helps..
tarun


Ville Herva <vherva at viasys.com> wrote:

Hi!

I had a brief look sometime ago at hacking something like this into rsync,
but I didn't find a C API for reparse points. If you make progress, please
keep me (or rsync mailing list) posted!

On Fri, Feb 20, 2004 at 12:26:56PM -0500, you [Jason M. Felice] wrote:
> > jason::
> > Win32 backup semantics : what are these?????
> 
> Like anything else in Windows, it's a kludge ontop of a kludge ontop of
> another kludge in order to fix the original kludge. Since Windows
> programs can't rely on being able to open files that other programs have
> open, there would be no way to write a useful tape backup program. To
> fix, they added "backup semantics". If your process has permission to
> do so, it can request backup semantics which will allow it to open files
> which are already open. 
> 
> Of course it's this sort of thinking which is the reason why the Windows
> API to open a stupid file has seven parameters and a buttload of flags
> and pointers to structures which no longer work in recent versions of
> Windows. 

Well apart from being kludge, there is some merit to the Windows solution.
I'm not sure what exactly you are referring to with "backup semantics", but
I've understood ntbackup.exe on W2k or newer uses reparse points for backing
up files. That way it is not only capable of reading files that are open for
writing, but also gets a (somewhat) consistent snapshot of the files that
are written to. 

For example, Outlook likes to create mailboxes that are ~1GB. Rsyncing them
takes a considerable amount of time. During that time, Outlook may write all
over the file which mean the rsync's backep up version will be hugely
inconsistent. With a reparse point, the backup file will be a snapshot of
one point of time -- Outlook may have been in the middle of writing
something, but the the situation is similar to a sudden powerloss, and
Outlook has much better chance at recovering.

So do you reparse points by "backup sementics" or "just" being able to read
every open file (backup capability)?

> I've received a reply from the Cygwin people that suggests Cygwin
> _always_ uses backup semantics, and a little information about how. It's
> some pretty hairy code and I'm still deciphering it, but it could be that
> I was authoring that patch for nothing. I'll post more when I figure it
> out.

Hmm, cygwin always uses backup semantics for what? Everything? The rsync
I've compiled on cygwin does fail to read certain files...


regards,

-- v --

v at iki.fi
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.


More information about the rsync mailing list