Knowledgebase: Administration
Cloning a MarkLogic instance or cluster
12 April 2021 10:19 PM


There may be situations where a MarkLogic cluster has evolved over time and there may be a need to create a clone of that setup in order to create another separate development environment.

In this Knowledgebase article we will outline the necessary steps to clone / move a MarkLogic environment.

Important notes:

  • The target environment must have the same architecture as the source cluster (e.g., Windows, Linux, Solaris). The CPUs must also have the same number of bits (e.g., 64, 32).
  • The target environment must have the same allocated disk space as the master environment if all databases are to be transferred
  • The approach outlined below performs a match on forest, app server and database names; these have to match in both environments but can be changed at a later stage
  • Forest allocation (per database) should be identical in both environments; this process will not take into account the case where extra forests are required but this is scenario is covered briefly in the following places:
  • The number of nodes in the cluster can be different as long as the number of forests remains the same
  • Many configuration steps can be scripted using MarkLogic's extensive list of Admin APIs - these are not covered here but more information is detailed in the product documentation

Please note that there may be subtle differences between major releases of MarkLogic versions; for example, the URI to the configuration manager has changed and new features have been added in newer releases of the product

Preparation steps for cloning the master environment

  • Backup all of your databases that you want to clone including their dependencies (you should exclude Security, Schemas, Triggers, Modules from this list)
    • You can also consider making backups of the master forests - but be sure to exclude the journals as you do this
  • Security, Schemas, Triggers, Modules should be individually backed up as separate tasks in this process
  • Open Configuration Manager in your browser to export all your current database settings
    • http://:8002/manage/v1/list/package/ for MarkLogic 5 and 6
    • http://:8002/nav/ for MarkLogic 7 (only select settings)
    • select only your custom app-servers and
    • databases; leave the default ones

The Configuration Manager tool was deprecated starting with MarkLogic 9.0-5, and is no longer available in MarkLogic 10. Alternatives to Configuration Manager are covered here

  • For any non-MarkLogic data (such as XQuery, Deployment scripts etc.) required to run your application, ensure these are manually zipped and copied over as part of this stage of the process
  • Copy all the data to a mountpoint which is accessible by your target environment.

If you don't have your current MarkLogic version available for installation you can download the install binary using curl; this will also allow you to download older versions if required.  For example: to download the binary for MarkLogic Server 10.0-6, you could use the following call:

curl -O -XPOST -d'' ''

Note:  if the version you need is not available via curl, you can contact MarkLogic Support for older versions.

Steps for installation of the new data center / target environment

  • Perform a standard MarkLogic server/cluster installation on each of the new target nodes
  • Configure individual groups as required for the target environment
    • Values may differ when compared to the master environment in cases where - for example - different hardware is used
    • Manual customization is recommended for this
  • Restore the Security and Schema database from backup
    • This will restore all the user settings from your master environment
  • Verify that you still can access the server/cluster
  • Create all your forests ( including replicas if you're using any of the replication features in the product )
    • Forest names must match those in the master server/cluster as mentioned previously
    • Configure and attach the replica forests as required (optional)
  • Create all application servers and databases (only required for MarkLogic 5 and 6)
    • Again, note that these should have the same names as per the master server/cluster
    • Leave all other settings as per the defaults
  • Verify all assignments match those in the master server/cluster
  • On a node in the new target environment, open Configuration Manager in your browser
    • http://:8002/manage/v1/list/package/ (MarkLogic 5 and 6)
    • http://:8002/nav/ for MarkLogic 7 (only select settings)
    • import the packages you exported during the preparation steps
    • apply all changes
    • verify the changes in the Admin-UI
  • Restore all other databases
  • Place your custom scripts onto the file system

After following these steps, you should now have a clone of your master server/cluster.

Please note that some steps may differ if you have created custom Security or Schemas databases; in this case you would need to create those first on the target environment and then perform the restore from the backup.

If you don't have any configuration scripts already written to setup your master server/cluster, you may want to look into the Admin API documentation (please ensure you view the correct document for the installed version of the product) for a basic setup of all your app-server, databases and forests:

(7 vote(s))
Not helpful

Comments (0)