> 
> James Harper a écrit :
> > What would be involved in storing some extra data about the previous
> > backup in the database?
> >
> > To make use of the NT USN Change Journal, it could be useful to store
> > the last USN at the time of the backup, and then give it back to the fd
> > when the next incremental or differential is done, in a similar fashion
> > to how the 'since' parameter works now.
> >
> It would be nicer if we can convert a USN into a timestamp with
> microsoft API.... Or if it's impossible, i think that we can manage this
> information localy and have this information in the state file.

Each journal entry has the USN, a timestamp (FILETIME - even though the docs 
say SYSTEMTIME), a DWORD of attributes, and miscellaneous other stuff.

> 
> > This isn't absolutely necessary, and given that the backup isn't atomic
> > I'm not sure it would work out anyway (eg when do you record the current
> > USN - at the start of the backup or at the end of the backup? Either way
> > there is a potential to miss something). Unless maybe the VSS stuff
> > could make it atomic? Hmmm.....
> 
> If it works well, after the vss snapshot, the journal shouldn't change
> anymore. So, it should be quite easy to get start and stop USN.

Having actually written the code, I'm not sure it's that important. Basically I 
just do a binary search of the whole USN journal until I find the last 
timestamp that is less than the 'since' date. That is so fast that there isn't 
much attraction in bothering to store the 'last USN' (USN is 64 bits, the last 
3 bits are always 0, and the USN journal itself is probably never larger than 
2^28 bytes) 

James


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to