使用 CouchbaseCLI cbexport 错误导出数据
Exporting data using CouchbaseCLI cbexport error
我尝试按照文档进行操作,并使用以下命令以 JSON 格式从 travel-sample 存储桶中获取数据
命令:C:\Program Files\Couchbase\Server\bin>cbexport json -c couchbase://127.0.0.1 -u Administrator -p uity790 -b travel-sample -o F:/travel-sample.json -f lines -t 4
但我不断收到此错误“JSON 导出失败:无法导出可转移:从集合感知集群导出需要提供 scope/collection 字段”
在 windows 上使用 CLI 的正确方法是什么?
根据 7.0 documentation on cbexport-json:
--scope-field <scope_field> When exporting from a collection aware cluster this field will be created in each JSON document; it will be
used to store the name of the scope the document came from.
--collection-field <collection_field> When exporting from a collection aware cluster this field will be created in each JSON document; it
will be used to store the name of the collection the document came
from.
看来您还需要指定这些参数。类似于:
--scope-field couchbaseScope --collection-field couchbaseCollection
我尝试按照文档进行操作,并使用以下命令以 JSON 格式从 travel-sample 存储桶中获取数据
命令:C:\Program Files\Couchbase\Server\bin>cbexport json -c couchbase://127.0.0.1 -u Administrator -p uity790 -b travel-sample -o F:/travel-sample.json -f lines -t 4
但我不断收到此错误“JSON 导出失败:无法导出可转移:从集合感知集群导出需要提供 scope/collection 字段”
在 windows 上使用 CLI 的正确方法是什么?
根据 7.0 documentation on cbexport-json:
--scope-field <scope_field> When exporting from a collection aware cluster this field will be created in each JSON document; it will be used to store the name of the scope the document came from.
--collection-field <collection_field> When exporting from a collection aware cluster this field will be created in each JSON document; it will be used to store the name of the collection the document came from.
看来您还需要指定这些参数。类似于:
--scope-field couchbaseScope --collection-field couchbaseCollection