cbdocloader
Thecbdocloadertool is used to load a group of JSON documents in a given directory or in a single.zipfile into a Couchbase bucket.
Syntax
The basic syntax is:
cbdocloader -n [host]:8091 -u [Administrator] -p [password] -b [bucket-name] [source-file]
Description
When loading documents and any associated design documents for views, use a directory structure similar to the following:
/design_docs // which contains all the design docs for views. /docs // which contains all the raw json data files. This can contain other sub directories too.
All JSON files to upload must contain well-formatted JSON. File names should exclude spaces.
Types of errors:
-
Files are not well-formatted
-
Credentials are incorrect
-
RAM quota for a new bucket to contain the JSON is too large given the current quota for Couchbase Server
| When uploading both JSON documents and design documents, be aware that the design documents are uploaded after all JSON documents. |
This tool is found in the following locations, depending on the platform:
| Operating system | Location |
|---|---|
Linux |
/opt/couchbase/bin/cbdocloader |
Windows |
C:\Program Files\Couchbase\Server\bin\cbdocloader |
Mac OS X |
/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbdocloader |
Options
The following are the command options:
| Option | Description |
|---|---|
|
Show this help message and exit. |
|
REST username of the cluster.
It can be specified in environment variable |
|
REST password of the cluster.
It can be specified in environment variable |
|
Specific bucket name.
The default is |
|
Node address. The default port is 8091. |
|
RAM quota for the bucket in MB. The default is 100MB. |
The cbdocloader tool is typically used during the initial Couchbase Server install.
|