Domino API Problem - NSFIsNewBackupNeeded

Posted on 2004-11-11
Last Modified: 2013-12-18
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?

Question by:sourcesys
    LVL 31

    Expert Comment

    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?

    Author Comment

    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
    LVL 31

    Accepted Solution


    Author Comment

    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

    LVL 31

    Expert Comment

    No, thank you!

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
    This is an old article, please see an updated version of this article, located here:
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now