<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 04/10/2012 11:46 PM, MATON Brett wrote:
    <blockquote cite="mid:201204110547.q3B5l2mA001344@mx1.redhat.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Times New Roman \, serif";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Courier New \;color\:\#1F497D";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle27
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif][if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Thanks for the
            suggestions.</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">  For the
            record, status 32 was an error on my part, I hadn’t quoted
            the bind DN so ldapsearch was actually complaining about the
            bind DN not being found, not the backup task.</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">  Noriko, I’ve
            searched “cn=backup,cn=tasks,cn=config” and can’t find
            nstaskstatus anywhere.  I’m assuming that it also gets
            deleted once the task is complete...</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New Roman ,
            serif&quot;,&quot;serif&quot;"><br>
            cn=backup,cn=tasks,cn=config is the parent entry for all
            backup task entries.  When you create an entry under this
            parent, it starts the backup task.   It is the backup task
            entry that has the nsTaskStatus attribute, not the parent
            entry "cn=backup,cn=tasks,cn=config".  When the backup task
            is complete, and the ttl is expired, the backup task entry
            is automatically removed.<br>
            <br>
            <br>
          </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">Hi Rich,  I
            appreciate your clarification.  I did however mean that I
            was searching “cn=backup,cn=tasks,cn=config” with no
            additional filters which should have returned everything,
            nsTaskStatus included for any backup job?</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;">Exactly what search
            parameters (e.g. ldapsearch command line arguments) did you
            use?<br>
            <br>
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New Roman ,
            serif&quot;,&quot;serif&quot;"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">  I might just
            be having a dumb moment but I couldn’t think of an efficient
            way to check the error log for a Backup Finished entry,
            anyone with suggestions?</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New Roman ,
            serif&quot;,&quot;serif&quot;"><br>
            The best way is to do the ldapsearch as described above.<br>
            <br>
            <br>
          </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">  I’m still
            having issues, $taskDN for example would be something like
            cn=backup_2012_4_5_13_36_23, cn=backup, cn=tasks, cn=config</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
          </span><span style="font-size:10.0pt;font-family:&quot;Courier
            New ;color:#1F497D&quot;,&quot;serif&quot;">COUNT=1</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">while [ ${COUNT} -ne
            0 ]; do</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">#</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">#  OOPS:  -b
            ${taskDN}</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">#         -b
            "cn=backup,cn=tasks,cn=config" "cn=&lt;task&gt;"</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">#</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">        COUNT=$(ldapsearch -x -H
            ${HOST} -D "${BINDAS}" -y ${PWFILE} -b
            "cn=backup,cn=tasks,cn=config" "(${taskDN})" dn | grep -c
            '^dn')</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;">so this would expand to
            something like<br>
            COUNT=$(ldapsearch -x -H ldap.example.com -D "cn=directory
            manager" -y pwfile.txt -b "cn=backup,cn=tasks,cn=config"
            "(cn=backup_2012_4_5_13_36_23, cn=backup, cn=tasks,
            cn=config)" dn | grep -c '^dn')<br>
            <br>
            This is incorrect in the following ways:<br>
            1) the argument to -H must be a valid LDAP URL - so -H <a
              moz-do-not-send="true" href="ldap://ldap.example.com">ldap://ldap.example.com</a></span><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;;color:#1F497D">   $HOST is
            just a variable name, it’s actually the URL</span><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;"><br>
            2) "(cn=backup_2012_4_5_13_36_23, cn=backup, cn=tasks,
            cn=config)" is not a valid LDAP search filter - if you want
            to search for the backup entry, do one of the following<br>
            a) ldapsearch ... -s base -b "cn=backup_2012_4_5_13_36_23,
            cn=backup, cn=tasks, cn=config" ...<br>
            or<br>
            b) ldapsearch ... -b "cn=backup, cn=tasks, cn=config"
            "(cn=backup_2012_4_5_13_36_23)" ...</span><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;;color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">OK, search
            terms corrected.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">The command
            expands to and returns this:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">ldapsearch -x -H <a class="moz-txt-link-freetext" href="ldaps://">ldaps://</a>&lt;host
            fqdn&gt;:636 -D "cn=Directory Manager" -y /root/.389ds-pw -s
            base -b "cn=backup_2012_4_11_7_28_40, cn=backup, cn=tasks,
            cn=config"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"># extended LDIF<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">#<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"># LDAPv3<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"># base
            &lt;cn=backup_2012_4_11_7_28_40, cn=backup, cn=tasks,
            cn=config&gt; with scope baseObject<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"># filter: (objectclass=*)<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"># requesting: ALL<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">#<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D"># search result<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">search: 2<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">result: 32 No such object<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"># numResponses:
            1<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;"><br>
          </span><span style="font-size:12.0pt;font-family:&quot;Times
            New Roman&quot;,&quot;serif&quot;;color:#1F497D">I tweaked
            the db2bak.pl script to include ttl: 600 as I wanted some
            time to examine the backup task entry and search results:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;;color:#1F497D">...<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">$dn = "dn: cn=$taskname, cn=backup,
            cn=tasks, cn=config\n";<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">$misc = "changetype:
            add\nobjectclass: top\nobjectclass: extensibleObject\n<b>ttl:
              600\n</b>";<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">$cn = "cn: $taskname\n";</span><span
            style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><br>
          </span><span style="font-size:12.0pt;font-family:&quot;Times
            New Roman&quot;,&quot;serif&quot;;color:#1F497D">...<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">The entry gets
            added, but still disappears near instantaneously (db2bak.pl
            called standalone for output):<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">Back up directory:
            /var/lib/dirsrv/slapd-&lt;host&gt;/bak/&lt;host&gt;-2012_4_11_7_42_4<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">ldap_initialize( &lt;DEFAULT&gt; )<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">add objectclass:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">        top<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">        extensibleObject<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">add ttl:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">        600<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">add cn:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">        backup_2012_4_11_7_42_4<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">add nsArchiveDir:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">       
            /var/lib/dirsrv/slapd-&lt;host&gt;/bak/&lt;host&gt;-2012_4_11_7_42_4<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">add nsDatabaseType:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">        ldbm database<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">adding new entry
            "cn=backup_2012_4_11_7_42_4, cn=backup, cn=tasks, cn=config"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">modify complete<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">As you can see
            from the ls output below, tar is still being called before
            the task has completed:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">[root@&lt;host&gt; backup]# ls -ltr<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">-rw-r--r--. 1 root   root     6788
            Apr 11 07:28 20120411072840-&lt;host&gt;.tgz<o:p></o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">drwx------. 5 nobody nobody   4096
            Apr 11 07:28 20120411072840-&lt;host&gt;</span><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D" lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Thanks
            for your time....</span></p>
      </div>
    </blockquote>
    ok - I'd like you to try two more things:<br>
    1) alter your search parameters - do this instead:<br>
    ldapsearch -x -H <a class="moz-txt-link-freetext" href="ldaps://">ldaps://</a>&lt;host fqdn&gt;:636 -D "cn=Directory
    Manager" -y /root/.389ds-pw -b "cn=backup, cn=tasks, cn=config"<br>
    do you see anything?<br>
    2) can you confirm using the errors log (manually, not automated
    with a script) that your backup task was started successfully and
    completes successfully?  Just to be sure that it is indeed being
    started and finishing correctly<br>
    <blockquote cite="mid:201204110547.q3B5l2mA001344@mx1.redhat.com"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">        if [
            ${COUNT} -ne 0 ]; then</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">         
                  sleep 5s</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">        fi</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier New
            ;color:#1F497D&quot;,&quot;serif&quot;">done</span><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:10.0pt;font-family:&quot;Courier
            New&quot;;color:#1F497D">tar czf
            ${BACKUPPATH}${BKTSTAMP}-${INSTANCE}.tgz -C /
            ${DSBACKUPDIR#/*}</span><span
            style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">However the tar
            file is incomplete, because (assumption) the backup has not
            finished writing to disk before tar starts....</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">  For the time
            being I’ve settled on two scripts, one to start backups and
            another to archive yesterdays (or older) backups.  Not ideal
            but workable</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">Thanks again,</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D">Brett</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext"
                lang="EN-US"> <a moz-do-not-send="true"
                  href="mailto:389-users-bounces@lists.fedoraproject.org">389-users-bounces@lists.fedoraproject.org</a>
                [<a moz-do-not-send="true"
                  href="mailto:389-users-bounces@lists.fedoraproject.org">mailto:389-users-bounces@lists.fedoraproject.org</a>]
                <b>On Behalf Of </b>Noriko Hosoi<br>
                <b>Sent:</b> 05 April 2012 18:40<br>
                <b>To:</b> General discussion list for the 389 Directory
                server project.<br>
                <b>Subject:</b> Re: [389-users] How to tell when
                database backup has finished?</span><o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal">You could search the task.with nstaskstatus
          attribute.<br>
          <br>
          $ ldapsearch -LLLx -h localhost -p &lt;port&gt; -D
          'cn=directory manager' -w &lt;pw&gt; -b
          "cn=backup,cn=tasks,cn=config" "(cn=backup_*)" nstaskstatus<br>
          <br>
          When the task is done, you'll see the "Backup finished."
          status:<br>
          dn: cn=backup_2012_4_5_9_35_35,cn=backup,cn=tasks,cn=config<br>
          nstaskstatus: Backup finished.<br>
          <br>
          Another way would be checking the errors log, which logs the
          end of the back up.<br>
          <br>
          <br>
          <br>
          <o:p></o:p></p>
        <p class="MsoNormal">[05/Apr/2012:09:32:09 -0700] - Backing up
          file 31
          (/var/lib/dirsrv/slapd-totoro/bak/totoro-2012_4_5_9_32_8/DBVERSION)<br>
          [05/Apr/2012:09:32:09 -0700] - Backup finished.<o:p></o:p></p>
        <p class="MsoNormal">Thanks,<br>
          --noriko<br>
          MATON Brett wrote: <o:p></o:p></p>
        <p class="MsoNormal">Hi guys,<o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal">I want to tar up the backup set once a
          db2bak.pl backup job has finished.<o:p></o:p></p>
        <p class="MsoNormal">however because it writes an entry to the
          LDAP and doesn’t wait for the backup to finish I was wondering
          what the best way to determine when the backup has actually
          finished?<o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal">I was thinking that I could<o:p></o:p></p>
        <p class="MsoNormal">Ldapsearch at intervals for the backup cn
          entry, when it’s not there anymore backup has finished<o:p></o:p></p>
        <p class="MsoNormal">Ro maybe watch the audit log for a delete
          action on the backup cn entry..<o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal">Any thoughts appreciated.<o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal">Cheers,<o:p></o:p></p>
        <p class="MsoNormal">Brett<o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p class="MsoNormal"> <o:p></o:p></p>
        <p><span
style="font-size:7.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:gray">-------------------------------------------------------------------</span><o:p></o:p></p>
        <p class="MsoNormal"><strong><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">GreeNRB</span></strong><b><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933"><br>
            </span></b><em><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">NRB
              considers its environmental responsibility and goes for
              green IT.</span></em><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">
            <br>
            <i>May we ask you to consider yours before printing this
              e-mail? </i><b> </b></span> <o:p></o:p></p>
        <p class="MsoNormal"><b><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#000066">NRB,
              daring to commit <br>
            </span></b><i><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#000066">This
              e-mail and any attachments, which may contain information
              that is confidential and/or protected by intellectual
              property rights, are intended for the exclusive use of the
              above-mentioned addressee(s). Any use (including
              reproduction, disclosure and whole or partial distribution
              in any form whatsoever) of their content is prohibited
              without prior authorization of NRB. If you have received
              this message by error, please contact the sender promptly
              by resending this e-mail back to him (her), or by calling
              the above number. Thank you for subsequently deleting this
              e-mail and any files attached thereto.</span></i><o:p></o:p></p>
        <p class="MsoNormal"><span style="font-size:12.0pt"><br>
            <br>
            <br>
            <br>
            <br>
          </span><o:p></o:p></p>
        <pre>--<o:p></o:p></pre>
        <pre>389 users mailing list<o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="https://admin.fedoraproject.org/mailman/listinfo/389-users">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><o:p></o:p></pre>
        <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
        <p><span
style="font-size:7.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:gray">-------------------------------------------------------------------</span><o:p></o:p></p>
        <p class="MsoNormal"><strong><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">GreeNRB</span></strong><b><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933"><br>
            </span></b><em><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">NRB
              considers its environmental responsibility and goes for
              green IT.</span></em><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">
            <br>
            <i>May we ask you to consider yours before printing this
              e-mail? </i><b> </b></span> <o:p></o:p></p>
        <p class="MsoNormal"><b><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#000066">NRB,
              daring to commit <br>
            </span></b><i><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#000066">This
              e-mail and any attachments, which may contain information
              that is confidential and/or protected by intellectual
              property rights, are intended for the exclusive use of the
              above-mentioned addressee(s). Any use (including
              reproduction, disclosure and whole or partial distribution
              in any form whatsoever) of their content is prohibited
              without prior authorization of NRB. If you have received
              this message by error, please contact the sender promptly
              by resending this e-mail back to him (her), or by calling
              the above number. Thank you for subsequently deleting this
              e-mail and any files attached thereto.</span></i><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New Roman ,
            serif&quot;,&quot;serif&quot;"><br>
            <br>
            <br>
            <br>
          </span><o:p></o:p></p>
        <pre>--<o:p></o:p></pre>
        <pre>389 users mailing list<o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="https://admin.fedoraproject.org/mailman/listinfo/389-users">https://admin.fedoraproject.org/mailman/listinfo/389-users</a><o:p></o:p></pre>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New Roman ,
            serif&quot;,&quot;serif&quot;"> </span><o:p></o:p></p>
        <p><span
style="font-size:7.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:gray">-------------------------------------------------------------------</span><o:p></o:p></p>
        <p class="MsoNormal"><strong><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">GreeNRB</span></strong><b><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933"><br>
            </span></b><em><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">NRB
              considers its environmental responsibility and goes for
              green IT.</span></em><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#669933">
            <br>
            <i>May we ask you to consider yours before printing this
              e-mail? </i><b> </b></span> <o:p></o:p></p>
        <p class="MsoNormal"><b><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#000066">NRB,
              daring to commit <br>
            </span></b><i><span
style="font-size:7.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#000066">This
              e-mail and any attachments, which may contain information
              that is confidential and/or protected by intellectual
              property rights, are intended for the exclusive use of the
              above-mentioned addressee(s). Any use (including
              reproduction, disclosure and whole or partial distribution
              in any form whatsoever) of their content is prohibited
              without prior authorization of NRB. If you have received
              this message by error, please contact the sender promptly
              by resending this e-mail back to him (her), or by calling
              the above number. Thank you for subsequently deleting this
              e-mail and any files attached thereto.</span></i><o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:&quot;Times New
            Roman&quot;,&quot;serif&quot;"><o:p> </o:p></span></p>
      </div>
      <!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"-->
      <meta name="GENERATOR" content="TX_HTML32 11.0.211.501">
      <span style="FONT-FAMILY: 'Verdana'; COLOR: #808080; FONT-SIZE:
        7pt">
        <p><span style="FONT-FAMILY: 'Verdana'; COLOR: #808080;
            FONT-SIZE: 7pt">-------------------------------------------------------------------</span></p>
        <span style="FONT-FAMILY: 'Verdana'; COLOR: #808080; FONT-SIZE:
          6pt">
          <p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font
              face="tahoma,arial,helvetica,sans-serif"><font size="1"><font
                  color="#669933"><span style="FONT-FAMILY: "
                    lang="EN-GB"><strong>GreeNRB<br>
                    </strong><em>NRB considers its environmental
                      responsibility and goes for green IT.</em> <br>
                  </span><i><span style="FONT-FAMILY: " lang="EN-GB">May
                      we ask you to consider yours before printing this
                      e-mail? </span></i><b><span style="FONT-FAMILY: "
                      lang="EN-GB"> </span></b></font></font></font> </p>
          <p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font
              face="tahoma,arial,helvetica,sans-serif"><font size="1"><font
                  color="#000066"><b><span style="FONT-FAMILY: "
                      lang="EN-GB">NRB, daring to commit <br>
                    </span></b><i><span style="FONT-FAMILY: "
                      lang="EN-GB">This e-mail and any attachments,
                      which may contain information that is confidential
                      and/or protected by intellectual property rights,
                      are intended for the exclusive use of the
                      above-mentioned addressee(s). Any use (including
                      reproduction, disclosure and whole or partial
                      distribution in any form whatsoever) of their
                      content is prohibited without prior authorization
                      of NRB. If you have received this message by
                      error, please contact the sender promptly by
                      resending this e-mail back to him (her), or by
                      calling the above number. Thank you for
                      subsequently deleting this e-mail and any files
                      attached thereto.</span></i></font></font></font></p>
        </span></span>
    </blockquote>
    <br>
  </body>
</html>