1

I need to confirm the process to copy a database from a Linux ML 9.x server to a Windows ML 9.x server and wanted to make sure I understood properly.

Apparently I cant use a backup of a ML database taken on a Linux to restore onto a Windows server.

Here is what I think the high level process is and would welcome correction/assistance please :

On Linux source server :

(1) Export the database configuration on source server ( to file )

xquery version "1.0-ml";
 import module namespace admin = "http://marklogic.com/xdmp/admin" 
     at "/MarkLogic/admin.xqy";
 let $config := admin:get-configuration()
 let $config := admin:database-copy($config,xdmp:database("<The_existing_db>"),"<The_new_database>")

(2) Export all forest structures on source servers ( to file - where are these stored on disk? )

xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" 
     at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $config := admin:forest-copy($config,xdmp:forest("<original_forest>"),"<forest_copy>",())

(3) Export source data using mlcp ( to file/s - or db? )

On Windows destination server :

(4) Create new database from exported configuration files (5) Create forests from exported forest configuration files & attach to database (6) Import data using mlcp from exported files

Have I missed anything / got it wrong?

Thanks in advance.

steve
  • 395
  • 2
  • 11
  • I am on the same boat. I am curious if mlcp is able to preserve document property and permission information. – Fan Li Nov 20 '20 at 12:50

1 Answers1

1

To move data between platforms, use MLCP and ask it to make an archive. Please see the relevant docs at https://docs.marklogic.com/guide/mlcp/export#id_93332

To move configuration, you can use Configuration Manager (https://docs.marklogic.com/guide/admin/config_manager) but it’s deprecated because the best practice these days is to script the construction of all things, perhaps with ml-gradle (https://developer.marklogic.com/code/ml-gradle/), and to check those construction scripts into your source control and control configuration that way across your multiple environments.

hunterhacker
  • 6,378
  • 1
  • 14
  • 11
  • What if I don't have the option of using MLCP for the same? Is there any configuration that can be changed in the backup which can support this move? – Mehul Jul 01 '22 at 12:55