Programatically create Databases on a remote server

Hello Forum,

I want to create a remote server which contains every single user’s database (without messages), this is just for backup purposes, in case our European HeadQuarter dissapear (Fire, EarthQuake, Whatever) quickly redirect incoming mail to a server that will be able to receive every user’s mail and put in its database.

The procedure I’m planning is this:

-Create an agent (lotuscript) that reads names.nsf and gets every user’s database name and create that db on the remote server.

-Create an agent that quickly modify every person’s Server Field on the Person Document in names.nsf so it would reflect the remote server.

I have both scripts, but in the first one I’m facing some issues:

This is the script:

Sub Initialize

Dim namesdb As New NotesDatabase( "", "copianames.nsf" )

Dim dbfirstname As Variant

Dim dblastname As Variant

Dim dbtitle As Variant



Set view = namesdb.getview("People")

Set doc = view.GetFirstDocument



While Not ( doc Is Nothing )



	dbname = doc.Mailfile(0)

	dbfirstname = doc.Firstname(0)

	dblastname = doc.Lastname(0)

	dbtitle = dbfirstname &" "& dblastname

	If Not dbname = "" Then

		Dim session As New NotesSession

		Dim testdb As New NotesDatabase( "sninte", dbname )

		

		If testdb.IsOpen Then



		Else

			Dim db As New NotesDatabase("sninte",dbname)

			Call db.Create( "sninte" , dbname, True)

			db.title = dbtitle

		End If			

	Else

	End If

	Set doc =view.GetNextDocument(doc)		

Wend

End Sub

This script works, but it creates uninitialized databases.

I could do it using createfromtemplate, but if I launch it from Europe too many data goes on the wire.

I wanted to apply the templates on the server to all the unitialized dbs, but when I try to:

load convert -u -f databaselist.txt * dwa7.ntf

Mail convert: Failed on mail\database1.nsf. Design Replacement Error: Special database object cannot be located.

What am I missing?

Thanks in advance.

Subject: Programatically create Databases on a remote server

If your European headquarters is no more for whatever reason then you’ll be running these agents on the remote server, so you can use createfromtemplate - there is no data going down the wire (it doesn’t exist anymore).

Alternatively I would just set up replicas anyway which will always be available - you can set replication settings so that only the design gets replicated (which will be nothing most of the time).

Dan

Subject: RE: Programatically create Databases on a remote server

Hi Dan,

I want to launch the agents today from Europe, and leave the remote server just prepared with all databases allready created.

Best Regards

Subject: RE: Programatically create Databases on a remote server

Does the remote server not have a replica of the Domino directory? It should do, in which case you can run the agent on the remote server anyway, even now.

Although I’d still think about replicas and clustering anyway, as per my last response and the other response you got.

Dan

Subject: RE: Programatically create Databases on a remote server

Sounds like you should set up a cluster server in your Disaster Recovery site – this way is there is a problem the failover will be relatively seamless to the user – which is what you want in time of a disaster.

Why would you want to make yourself crazy? You don’t want to be running around running agents and users freaking out that they can’t access critical procedures, mail, emergency contact numbers, etc.

You have to be able to focus on the disaster at hand. Lotus Notes is designed in such a way that will help you keep business continuity – you should take advantage of it, right?