MarkLogic Content Pump (MLCP) is an open-source, Java-based command-line tool. MLCP provides the fastest way to import, export, and copy data to or from MarkLogic databases. It is designed for integration and automation in existing workflows and scripts.
MARKLOGIC CONTENT PUMP ON GITHUB ›
Get started with the MLCP online training course provided by MarkLogic University. You can also review over the MLCP User Guide for reference.
To get started moving data with MLCP, download and unpack the binaries. For those interested in hacking or look at the internals, you can also download the Apache 2.0 licensed source.
To create your first import script, make sure you have an XDBC server attached to your database (running on port 8006, for example, below). From the command line, run the following, substituting your particulars:
mlcp.sh import -host localhost -port 8006 -username user -password ******* -input_file_path /data/latest
To export a subset of that same database into a platform-independent archive:
mlcp.sh export -host localhost -port 8006 -username user -password ******* -output_type archive -output_file_path /out/collections -compress true
To import all triples from an N-Triples formatted file named example.nt
:
mlcp.sh import -host localhost -port 8006 -username user -password ******* -input_file_path example.nt -mode local -input_file_type RDF
This is a small sampling of the rich set of capabilities MLCP provides. For much more information, sample code, and examples, explore its documentation.
Notice about log4j: MarkLogic Content Pump (MLCP) v10.0.8.2 and v9.0.13.7 contain the fix for the runtime log4j vulnerability.
<dependency> <groupId>com.marklogic</groupId> <artifactId>mlcp</artifactId> <version>10.0.11</version> </dependency>
<dependency> <groupId>com.marklogic</groupId> <artifactId>mlcp</artifactId> <version>9.0.13.8</version> </dependency>
<dependency> <groupId>com.marklogic</groupId> <artifactId>mlcp</artifactId> <version>8.0.9</version> </dependency>
By continuing to use this website you are giving consent to cookies being used in accordance with the MarkLogic Privacy Statement.