Open
Description
Situation
I am using mlcp to export all documents of a database to the local filesystem. In the end, I have the correct number of local files, but some files that should be binaries actually contain XML content from other documents. The XML documents themselves are okay.
Steps to reproduce the issue
- Unzip the content of import.zip into a local folder
C:\Temp\mlcp\import
:
- Use mlcp to import the files into an empty database:
mlcp.bat import -host localhost -port 8070 -username **** -password **** -mode local -input_file_path C:\Temp\mlcp\import -output_uri_replace "/C:/Temp/mlcp/import,''"
- Observe content of database in Query Console:
For comparison with later results and to make sure everything is still okay after the import I used XQuery to determine the size of all documents:
for $doc in fn:doc() let $uri := fn:document-uri($doc) let $size := if (fn:exists($doc/binary())) then xdmp:binary-size($doc/binary()) else xdmp:binary-size(xdmp:unquote(xdmp:quote($doc),(),"format-binary")/binary()) order by $uri ascending return $uri || " -> " || $size
Everything looks good so far. - Use mlcp to export all documents to the local filesystem:
mlcp.bat export -host localhost -port 8070 -username **** -password **** -mode local -output_file_path C:\Temp\mlcp\export
- Compare import and export directory:
The XML documents and 5 out of 8 binary documents are okay. The problem is, that image-003.gif and image-008.gif now have to same content as doc-A.xml and image-007.gif has the same content as doc-B.xml.
My system environment
- Windows 10 Pro (1709)
- MarkLogic Server 9.0-5.1
- mlcp 9.0.6
- java 1.8.0_172