[MarkLogic Dev General] Backing Up and Restoring Settings for Database, Forests, AppServers
mike at blakeley.com
Mon Oct 24 16:14:01 PDT 2011
Are you asking about a single-instance cluster? That will make some difference.
In step (2), what happens when you get to Security and Schemas? If the admin API allows you to delete them, that will break the new instance. I think you could just skip that step, actually. The admin:save-configuration() call should just overwrite everything.
How do you plan to evaluate the script in (3)? This is a bootstrap problem. I don't think you can solve it as simply as you might like, because a freshly-installed server doesn't have a packing mechanism or even an ad-hoc query interface. One possibility is to upload code into /opt/MarkLogic/Admin/myapp/ and then eval it with wget or curl.
On 24 Oct 2011, at 15:30 , Ford, Kevin wrote:
> ML gurus,
> I'd like to back-up the settings for all databases, forests, and appservers per ML server instance. I've looked around but not been able to find anything definitive on this topic.
> I'm interested in the most efficient way to recover, for example, from a failure that would result in ML being reinstalled on a new machine.
> Would the following logic work?
> 1) Grab and save a copy of the configuration settings for all databases (using admin:database-copy, for example) from an existing ML server instance.
> 2) On a new, freshly-installed ML server instance, get all database IDs and delete each database per ID.
> 3) Then, using the copy of the exported settings, load the exported settings and admin:save-configuration($exported-settings) on the freshly-installed ML server.
> Naturally, something similar would have to be done for the Forests and Groups. And, based on the function notes, order of these events would be important, since no appservers can be targeting a to-be-deleted database, for example.
> Nevertheless, would the above work? And, if so, would it only work so long as the ML version number does not change between the exported settings and the newly installed server? Or would it partially work? For example, would it work so long as you do not delete the Schemas or Security databases (and/or other ones) from the new server?
> General mailing list
> General at developer.marklogic.com
More information about the General