Command Line Tools
Use Couchbase command line tools to import and export large amounts of data, and manage ad hoc backups.
Couchbase Server includes a suite of command line tools, available as a separate package for Couchbase Capella. Couchbase command line tools for Capella include cbimport and cb export and cbbackupmgr.
Prerequisites
The procedures on this page assume the following:
-
You’ve added your IP address to the database’s list of allowed IPs.
Download and Install the Couchbase Command Line Tools
Download the command line tools package for your platform through the following links:
-
Linux: https://packages.couchbase.com/releases/7.2.2/couchbase-server-tools_7.2.2-linux_x86_64.tar.gz
-
Linux aarch64: https://packages.couchbase.com/releases/7.2.2/couchbase-server-tools_7.2.2-linux_aarch64.tar.gz
-
macOS: https://packages.couchbase.com/releases/7.2.2/couchbase-server-tools_7.2.2-macos_x86_64.zip
-
macOS: arm64 https://packages.couchbase.com/releases/7.2.2/couchbase-server-tools_7.2.2-macos_arm64.zip
-
Windows: https://packages.couchbase.com/releases/7.2.2/couchbase-server-tools_7.2.2-windows_amd64.zip
Unzip or untar the packages, and the binaries are ready to run.
The zipped package also contains a README
file, and a copy of the software licenses.
For example, for Linux x86_64:
$ mkdir capella_server_tools_7.2.2
$ cd capella_server_tools_7.2.2
$ wget https://packages.couchbase.com/releases/7.2.2/couchbase-server-tools_7.2.2-linux_x86_64.tar.gz
$ tar -xf couchbase-server-tools_7.2.2-linux_x86_64.tar.gz
$ ls -1
bin
couchbase-server-tools_7.2.2-linux_x86_64.tar.gz
lib
LICENSE.txt
README.txt
share
$ cd bin
$ ls -1
cbbackupmgr
cbexport
cbimport
$ ./cbimport --version
cbimport version 7.2.2-6401 (d4f8e88a)
$ ./cbexport --version
cbexport version 7.2.2-6401 (d4f8e88a)
$ ./cbbackupmgr --version
cbbackupmgr version 7.2.2-6401 (d4f8e88a)
On Windows, you will need to have a recent Microsoft Visual C Redistributable already installed. Download the latest Visual C Redistributable from Microsoft Visual C++ Redistributable latest supported downloads. |
Other CLI Tools
Couchbase Shell (cbsh)
The new Couchbase shell, or REPL, to interact with Couchbase Capella is now in public beta.
Use cbsh to:
-
Extract, transform, and load different data formats.
-
Export data as JSON or CSV.
-
Import data from SQLite.
Use cbsh through development and production, for generating data and checking the status of your indexes.
For documentation on the Beta release, and more examples, see the Couchbase Shell Documentation.