Personal tools
How to automatically refresh your database in "silent mode"

The nightly wave

Apr 12, 2013

How to automatically refresh your database in "silent mode"

Break away from dependence on the Lotus Notes client to update your database: an easy tutorial to get applications with the latest update every morning

Scenario: a development server, a release server and many production customers' servers: nothing more classic.

Every time a change is deployed on the release server, the best thing would be to "push" it automatically on production server, or as soon as possible (at least).



We know that Lotus Domino provides the "Refresh design tool", but it requires a Lotus client installed and open, and a manual operation.

Maybe you can work with replicas of the template, but, in any case, the "optimum" would be:

  • break away from the dependence of the Lotus Notes client
  • schedule the operation in automatic mode.

So what?

Many solutions found over the Web, but...

As reported in this thread, automatic refresh design is something desired, perhaps to have something scheduled (agent), but even if low level Notes API are provided, it always requires an opened client and, in this case, a Windows client (API uses dll)!

Typically 'load convert' command is used for mail database

I remembered something about notes mail database administration, and a very cool stuff to upgrade mail templates, with this command:

load convert -n maildb.nsf * template.ntf

So, why not apply the same method to not-mail database?

I've investigated a lot, I've also opened a discussion on Stackoverflow and many authoritative people (Richard H. Schwartz, Per Henrik Lausten) answered me about different approaches, but I think that "load convert way" could be a good solution.

Be careful! If you try this, you can run into some problems: below I'll try to answer at the most commons I've experienced, and steps to resolve them.


What about if templates are on remote server?


It's possible to directly refer the remote template, using this syntax:

load convert -n mydatabase.nsf * remoteserver!!template.ntf

where remoteserver is abbreviated name (e.g. removeServerName/OrgUnit/Org).

NOTICE: database and remote template could also be located in subfolder, so you can use:

load convert -n dir1/dir2/mydatabase.nsf * remoteserver!!dir3/dir4/template.ntf



When I send the command, I obtain this error: 'Mail Upgrade Failed: Unable to open design template file ......Unable to find path to server'"


On production server, you need to create a connection to the release server, as shown in pictures:




After the connection is done, I obtain this error: 'The Address Book does not contain a cross certificate capable of validating the public key'


A cross-certification between organizations is needed, in both directions (release server to production server and vice-versa), using and

Ready to go!

All the prerequisites for a correct communication are made.

Now is possible to schedule the refresh command whenever you want, in your preferred way, for example:

  • making a program (see here)
  • with a scheduled agent that send commands to server

Next lines show how to do this in a Java agent:

String command = "load convert -n mydatabase.nsf * remoteserver!!template.ntf";
System.out.println(session.sendConsoleCommand("", command));

That's all! Feel free to let me know what do you think about this approach. Any comment/review will be appreciated!

Filed under: , ,
comments powered by Disqus