我正在使用以下命令
mlcp.sh copy -input_host localhost -output_host localhost \
-input_database emh-entity-manager-content \
-output_database emh-schema-map-manager-content \
-input_port 8000 -input_username admin -input_password xxxxxx \
-document_selector '/envelope[descendant::*:CustomerID = "SEVES"]'
我收到了错误
ERROR contentpump.ContentPump: Unrecognized argument: =
usage: COPY [-batch_size <number>] [-collection_filter <String>]
[-copy_collections <true,false>] [-copy_permissions <true,false>]
[-copy_properties <true,false>] [-copy_quality <true,false>]
[-directory_filter <String>] [-document_selector <String>]
[-fastload <true,false>] [-hadoop_conf_dir <directory>]
[-input_database <database>] -input_host <host> [-input_password
<password>] [-input_port <port>] [-input_username <username>]
[-max_split_size <number>] [-min_split_size <number>] [-mode
<mode>] [-output_collections <collections>] [-output_database
<database>] [-output_directory <directory>] -output_host <host>
[-output_partition <partition name>] [-output_password <password>]
[-output_permissions <permissions>] [-output_port <port>]
[-output_quality <quality>] [-output_uri_prefix <prefix>]
[-output_uri_replace <list>] [-output_uri_suffix <suffix>]
[-output_username <username>] [-path_namespace <String>]
[-query_filter <String>] [-snapshot <true,false>]
[-temporal_collection <String>] [-thread_count <count>]
[-tolerate_errors <tolerate errors>] [-transaction_size <number>]
[-transform_function <String>] [-transform_module <String>]
[-transform_namespace <String>] [-transform_param <String>]
错误消息几乎没用。我正在尝试将一组与特定xpath匹配的文件从同一服务器上的一个数据库复制到另一个数据库。
我错过了什么?
谢谢, 洛伦
答案 0 :(得分:3)
有一些事情正在发生:
MLCP有一个很好的选项叫做 -options_file ,它有助于处理命令行转义。您只需将所有选项添加到文件中即可解析。 https://docs.marklogic.com/guide/mlcp/intro#id_36150
我将使用的命令是:
/path/to/mlcp.sh -options_file options.txt
options.txt文件的内容为:
copy
-input_host
localhost
-output_host
localhost
-input_database
emh-entity-manager-content
-output_database
emh-schema-map-manager-content
-input_port
8000
-input_username
admin
-input_password
xxxxxx
-output_username
admin
-output_password
xxxxxx
-document_selector
/envelope[descendant::*:CustomerID = "SEVES"]