Domino API Problem - NSFIsNewBackupNeeded

Background: We are trying to troubleshoot a backup problem for a client. They are using dataprotector from HP to back up a couple of domino servers with dom.doc on them. The servers are running with transactional logging in archived mode to allow point in time restores. There are a few hundred MB of changes perday to the databases on 300GB of total data. The servers are 6.0.4 on Windows 2000

Problem :The problem is that the incremental backups are almost always backing up every database on the server and thus taking too long (basically a full backup nightly). We have been asked to confirm the functionality of the NSFIsNewBackupNeeded api query that is used by HP and see what it returns. We wrote an agent using a ComfortSpan of (0) against the data on their servers and our and got this type of data:

       isBackupNeeded starting

       activity.ntf                              1
       admin4.nsf                             17894447
      AgentRunner.nsf                     17894449
                bookmark.nsf                          1
      domdoc\KMGN-589MNV.nsf      17893763
      domdoc\KMGN-589MQP.nsf      17893733
      domdoc\KMGN-589MQQ.nsf      17893716
       domdoc\KMGN-589MRR.nsf      17893716
      domdoc\KMGN-589MRS.nsf      17893714
      domdoc\KMGN-589MUX.nsf      17893693
      domdoc\KMGN-589MUY.nsf      17893691

from what we understand (have read) nsfisnewbackupneeded will:

"Determine the state of the database or database backup file with respect to the current log state. This function either returns a Boolean (0 or 1 value) for backupNeeded, if a comfortSpan is supplied (specified in K bytes), or returns the actual span of log needed for recovery, if a comfortSpan of 0 is supplied (the only supported configuration for archived logging). The comfortSpan is the amount of log to be remaining before the backup would be made useless by a logging wrap in a 'CIRCULAR' type logged system (see Transactional Logging settings in the Administering the Domino System documentation)."

So we are ending up with a value of 17Gigs as needed to recover the database? The other odd thing is the values are almost identical regardless of database size (they are not 17gigs each) and also they roughly decrease in numerically in alphabetical order.

Does anyone out there have a clue what these numbers might actually represent?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I suspect you might have a problem with your tlogs.  I've never dug as deep as you have, but the numbers really don't make a lot of sense.  The nly thing that could possibly make it make any sense is if the nubers are retruned in bytes, even though comfort is specified in K.  But even then, AgentRunner should be tiny, not 17MB, under most circumstances.

Have you tried disabling tlogs, stopping, clearing the old tlog, restarting, enabling tlogs, and restarting?

Also note that in an archive-type log, if the log fills, you essentially stop transaction logging -- all writes have to go to the database.  (In circular logging, I think you lose part of your log data, which is worse, of course).  Is there any possibility taht you filled your log space?

Finally, I wuld like to see the code you ran to get the output you show.  Was this a standard LS agent with calls to the C API defined?
sourcesysAuthor Commented:
On one of the two servers in question we deleted the transaction logs and recreated with no luck. We also tested on one of our test servers (running 6.5.2) that did not originally have transaction logging enabled (so we enabled it) and got similar results. Drive is fine lots of space (as long as it gets backed up).

ya it was a LS script as you say just the essential stuff below
backupNeeded is the value looked at:

Declare Function NSFIsNewBackupNeeded Lib "nnotes.dll" (Byval dbName As String, Byval  comfortSpan As Long, backupNeeded As Long) As Integer

Dim result As Integer
Dim backupneeded As Long      

result=NSFIsNewBackupNeeded("catalog.nsf", 0, backupNeeded)

Thanks for taking the time

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sourcesysAuthor Commented:
Sorry for the delay.

Turns out the HP software was incorrectly programmed. We still can't seem to figure out the results we got from the nsfinsnew agent but in the end we managed to get HP to fix a few things.

Thanks for the help Q

No, thank you!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.