From Passion to Profession
  • Home
  • Notes
  • Projects
  • Resources
    • Discovery Log
    • Books I Read
    • Blogs I Visit
    • Tools I Use
  • Home
  • Notes
  • Projects
  • Resources
    • Discovery Log
    • Books I Read
    • Blogs I Visit
    • Tools I Use

Copy Marklogic Data between Marklogic Servers - mlcp

10/1/2013

0 Comments

 
Picture
As part of Marklogic 6.0 release, a new Marklogic Supported tool named Marklogic Content Pump (mlcp) let you copy/move/migrate/shift data from one Marklogic server to another. If you're using Marklogic below version 6.0, the way to do this is to use XQsync to import/export Marklogic documents and metadata.

To copy date between servers, you can use the mlcp copy command. Alternatively, you can use mlcp export command with an output type of archive (that includes content and metadata) to create a database archive. Then use the mlcp import command to copy/import the archive to another database to complete migrating the database contents.

Install mlcp

Use mlcp only if you have Marklogic 6.0 or above. If not, use XQsync instead.
  1. Download mlcp binary zip package.
  2. expand downloaded marklogic-contentpump-1.0.3.zip
  3. cd to <installation-dir>/marklogic-contentpump-1.0.3/bin/

Copy Marklogic Data

To copy from one Marklogic server directly to another, e.g.,
./mlcp.sh copy -help
./mlcp.sh copy -mode local \ 
 -input_host host1 -input_port 8020 -input_username admin -input_password admin \ 
 -output_host host2 -output_port 8006 -output_username admin -output_password admin \ 
 -thread_count 8

Export Marklogic Data

To export Marklogic Archive from one server,
./mlcp.sh export -help
./mlcp.sh export -host <server> -port <port> \  // 1
    -username admin -password admin \
    -mode local \                                                // 2
    -directory_filter /content/cq/ \                       // 3
    -output_file_path /tmp/testcollection -output_type archive

[1] XDBC server and port on which XDBC server is running to export data from.
[2] mlcp transparently splits work among multiple threads on a local/single machine.
[3] Limit the dump to /content/cq/ directory

Import Marklogic Data

To import a Marklogic Archive into another Marklogic server, e.g.,
./mlcp.sh import -help
./mlcp.sh import -host localhost -port 8006 -username user -password passwd \
-input_file_path /space/bill/data \
-mode local

References

  • MarkLogic Content Pump
  • New Features in MarkLogic 6
0 Comments



Leave a Reply.

    Categories

    All
    Algorithm
    Concurrency
    CQ
    Data Structure
    Design Pattern
    Developer Tool
    Dynamic Programming
    Entrepreneur
    Functional Programming
    IDE
    Java
    JMX
    Marketing
    Marklogic
    Memory
    OSGI
    Performance
    Product
    Product Management
    Security
    Services
    Sling
    Social Media Programming
    Software Development

    Feed Widget

    Archives

    May 2020
    March 2020
    April 2018
    March 2018
    February 2018
    December 2017
    March 2017
    November 2016
    June 2016
    May 2016
    April 2016
    October 2015
    September 2015
    August 2015
    September 2014
    July 2014
    June 2014
    May 2014
    March 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013

    RSS Feed

in loving memory of my mother  and my 4th aunt
Photos from net_efekt, schani, visnup, Dan Zen, gadl, bobbigmac, Susana López-Urrutia, jwalsh, Philippe Put, michael pollak, oskay, Creative Tools, Violentz, Kyknoord, mobilyazilar