[MarkLogic Dev General] How to generate Configuration scripts ?

Lee, David dlee at epocrates.com
Wed Aug 11 17:04:59 PDT 2010


Wow thanks for this idea, I didnt even think of it.

I suspect its not "sanctioned" as you say especially if you bump server
version #'s but if it works ... ha !  VASTLY simplier then parsing them

and generating the equivilent xquery code.

 

 

From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Michael
Sokolov
Sent: Wednesday, August 11, 2010 6:49 PM
To: 'General Mark Logic Developer Discussion'
Subject: Re: [MarkLogic Dev General] How to generate Configuration
scripts ?

 

Also - we have had good results simply restoring the config files
directly from /var/opt/MarkLogic/*.xml (on UNIX).  Just restore them to
the same folder, restart and hey presto.  I am sure there are edge
conditions where this could fail, but in case of total loss it is
definitely worth trying since it does generally seem to work.  You can
also do the same trick with the forests *if your db was shutdown when
you copied the forest files to backup*.  Otherwise you'll have to use
the forest restore tool to get them from an official backup.  At least
that's been my experience - I doubt this is the approach sanctioned by
ML.

 

-Mike

	 

________________________________

	From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Justin
Makeig
	Sent: Tuesday, August 10, 2010 1:38 PM
	To: General Mark Logic Developer Discussion
	Subject: Re: [MarkLogic Dev General] How to generate
Configuration scripts ?

	Jakob, David, and others,

	Yes, this is definitely something on our radar for a potential
future release. I'd be very interested in following up on specific
requirements.

	In the meantime, there is an open-source project called
Pomegranate <http://developer.marklogic.com/code/pomegranate> that might
be helpful. It's maintained by Don Anderson, a MarkLogic consultant.
Pomegranate allows you to package and deploy configuration and
application code to a MarkLogic cluster.

	 

	Justin

	 

Justin Makeig
Senior Product Manager
MarkLogic Corporation

Phone +1 650 655 2387 

email  justin.makeig at marklogic.com <mailto:justin.makeig at marklogic.com> 
web    www.marklogic.com <http://www.marklogic.com/> 

	 

	This e-mail and any accompanying attachments are confidential.
The information is intended solely for the use of the individual to whom
it is addressed. Any review, disclosure, copying, distribution, or use
of this e-mail communication by others is strictly prohibited. If you
are not the intended recipient, please notify us immediately by
returning this message to the sender and delete all copies. Thank you
for your cooperation.

	 

	On Aug 10, 2010, at 7:52 AM, Jakob Fix wrote:

	
	
	

	That sounds like something that would be great to see in the
product itself!
	
	I know that we have similar needs whenever we need to migrate
our
	servers/databases to another server. I think we posted a similar
	request to the mailing list not so long ago (ah yes, here it is:
	http://markmail.org/message/tycvhc4klbrtjwte)
	
	Maybe something for 4.3?
	
	cheers,
	Jakob.
	
	
	
	On Tue, Aug 10, 2010 at 16:42, Geert Josten
<Geert.Josten at daidalos.nl> wrote:
	
	

	Hi David,

		 

		You could use xdmp:read-cluster-config-file to acquire
database settings in xml syntax. Replace ids by names and filter
anything that looks default. You can parse the xml and translate that
into admin set function calls to reapply the configuration. It will take
some initial effort to get sufficient implemented to make it worth
while, but the result should be very general purpose..

		 

		Kind regards,

		Geert

		 

			 

		 

		 

		drs. G.P.H. (Geert) Josten

		Consultant

		 

		Daidalos BV

		Hoekeindsehof 1-4

		2665 JZ Bleiswijk

		 

		T +31 (0)10 850 1200

		F +31 (0)10 850 1199

		 

		mailto:geert.josten at daidalos.nl

		http://www.daidalos.nl/

		 

		KvK 27164984

		 

		 

		De informatie - verzonden in of met dit e-mailbericht -
is afkomstig van Daidalos BV en is uitsluitend bestemd voor de
geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden
ontleend.

		 

			From: general-bounces at developer.marklogic.com

			[mailto:general-bounces at developer.marklogic.com]
On Behalf Of

			Lee, David

			Sent: dinsdag 10 augustus 2010 15:51

			To: General at developer.marklogic.com

			Subject: [MarkLogic Dev General] How to generate

			Configuration scripts ?

			 

			I've just had the *exciting* opportunity to have
to totally

			rebuild a ML server.

			( For some reason Amazon EC2 corrupted the
filesystem and ML

			went kaptpuy).

			Fortunately I had a recent database backup of
both the data

			and the modules.  And *really fortunately* I
have a mirrored

			(copied) instance of the filesytem I run for
development.

			I could have just copied that mirror over and
run that but I

			wanted to recover "from scratch" to see what the
process is like.

			 

			What I discovered, which I had noticed before,
but it didn't

			really hit me until doing it all from scratch
again is what

			royal pain it is !

			Thankfully the backups included the Security
module so all my

			users were recreated.

			But I had to manually recreate all the Forests,
and Databases

			(and their zillion settings) and the App
Servers.

			I know all this can be scripted.   But I don't
want to have

			to *write* this script, it would probably take a
week due to

			having to test

			it over and over until I got it right.   What
I'd like is a

			"1 button" "Export Configuration" feature.

			 

			I've poked around the forums but couldn't find
such a beast

			although similar things were discussed wrt
creating users.

			Does anyone know of or suggest how to make such
a thing ? I

			suspect it should be about as easy to create a
script that

			queries a given installation and generates a
script to

			reconstruct it, as it would be to manually
generate the setup

			script.  (or am I overly optimistic).   Either
way a pain.

			This must be something other ML users have
needed ... maybe

			I'm missing a popular tool that's right in front
of me !

			 

			Any suggestions ?

			Thanks.

			 

			 

			 

			----------------------------------------

			 

			David A. Lee

			 

			Senior Principal Software Engineer

			 

			Epocrates, Inc.

			 

			dlee at epocrates.com <mailto:dlee at epocrates.com>

			 

			812-482-5224

			 

			 

			 

			 

		_______________________________________________

		General mailing list

		General at developer.marklogic.com

		http://developer.marklogic.com/mailman/listinfo/general

		 

	_______________________________________________
	General mailing list
	General at developer.marklogic.com
	http://developer.marklogic.com/mailman/listinfo/general

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20100811/430b817f/attachment-0001.html 


More information about the General mailing list