Migrate from Couchbase Server to Couchbase Capella on AWS
Created by Battulga Purevragchaa (AWS), Mark Gamble, and Saurabh Shanbhag (AWS)
Environment: Production | Source: Couchbase Server | Target: Couchbase Capella |
R Type: Replatform | Workload: All other workloads | Technologies: Migration; Analytics; Databases |
Summary
Couchbase Capella is a fully managed, NoSQL database as a service (DBaaS) for mission-critical applications (for example, user profiles or online catalogs and inventory management). Couchbase Capella manages your DBaaS workload in a Couchbase-managed Amazon Web Services (AWS) account. Capella makes it easy to run and manage multiple-cluster, multiple–AWS Region, multicloud, and hybrid-cloud replication within a single interface.
Couchbase Capella helps you instantly scale your Couchbase Server applications, helping you create multi-node clusters in minutes. Couchbase Capella supports all Couchbase Server features, including SQL++
This pattern describes the steps and best practices for migrating a self-managed Couchbase Server
This pattern provides the following two migration options:
Option 1 is appropriate if you have fewer than 50 indexes to migrate.
Option 2 is appropriate if you have more than 50 indexes to migrate.
You can also set up sample data
If you choose migration option 2, or if you are using scopes or collections other than the default value, you must use the example configuration file, which is in the Additional information section.
Prerequisites and limitations
Prerequisites
An existing Couchbase Capella paid account. You can also create a Couchbase Capella account on AWS
and use the Couchbase Capella free trial, and then upgrade to a paid account to configure your cluster for the migration.. To start with the trial version, follow the instructions in Getting Started with Couchbase Capella . An existing self-managed Couchbase Server environment either on premises or deployed on a cloud service provider.
For migration option 2, Couchbase Shell and a configuration file. To create the configuration file, you can use the example file that’s in the Additional information section.
Familiarity with administering Couchbase Server and Couchbase Capella.
Familiarity with opening TCP ports and running commands in a command line interface (CLI).
The migration process also requires the roles and expertise described in the following table.
Role | Expertise | Responsibilities |
Couchbase administrator |
|
|
Systems administrator, IT administrator |
|
|
Limitations
This pattern is used to migrate data, indexes, and Couchbase Full Text Search
indexes from Couchbase Server to Couchbase Capella on AWS. The pattern doesn’t apply to migrating Couchbase Eventing Service , or to Couchbase Analytics . Couchbase Capella is available in multiple AWS Regions. For up-to-date information on the Regions that Capella supports, see Amazon Web Services
in the Couchbase documentation.
Product versions
Architecture
Source technology stack
Couchbase Server
Target technology stack
Couchbase Capella
Target architecture
You access Couchbase Capella by using the Capella Control Plane. You can use the Capella Control Plane to do the following:
Control and monitor your account.
Manage clusters and data, indexes, users and groups, access permissions, monitoring, and events.
Clusters are created.
The Capella Data Plane is in the Couchbase-managed AWS account. After you create a new cluster, Couchbase Capella deploys it across multiple Availability Zones in the selected AWS Region.
You can develop and deploy Couchbase applications in a VPC in your AWS account. Typically, this VPC accesses the Capella Data Plane through VPC peering
.
Tools
Couchbase Cross Data Center Replication (XDCR)
helps replicate data across clusters that are located in different cloud providers and different data centers. It is used to migrate data into Couchbase Capella from self-managed Couchbase Server clusters. Note: XDCR cannot be used with Couchbase Server Community Edition to migrate to Couchbase Capella. Instead, you can use cbexport
. For more information, see the Migrate data from Community Edition epic. Couchbase Shell
is a command line shell for Couchbase Server and Couchbase Capella to access local and remote Couchbase clusters. In this pattern, Couchbase Shell is used to migrate indexes. cbexport
is a Couchbase utility for exporting data from Couchbase cluster. Included in Couchbase Server CLI tools .
Epics
Task | Description | Skills required |
---|---|---|
Evaluate the size of the self-managed Couchbase Server cluster. | Log in to the Couchbase Web Console
You will use your self-managed Couchbase Server cluster configurations as a general guide for sizing and configuring the target cluster on Couchbase Capella. For help with a more detailed Couchbase Capella sizing exercise, contact Couchbase | Couchbase administrator |
Record Couchbase Service distribution on the self-managed Couchbase Server cluster. |
| Couchbase administrator |
Record the IP addresses of the self-managed Couchbase Server cluster nodes. | (Ignore this step if you are using Community Edition.) Record the IP address for each node in your cluster. They will be added to the allow list on your Couchbase Capella cluster later. | Couchbase administrator, Systems administrator |
Task | Description | Skills required |
---|---|---|
Choose a template. |
| Couchbase administrator |
Choose and configure the nodes. | Choose and configure the nodes to match your self-managed Couchbase Server cluster environment, including the number of nodes, services distribution, compute or RAM, and storage. Couchbase Capella uses multidimensional scaling | Couchbase administrator |
Deploy the cluster. | Choose a support zone and support package, and then deploy the cluster. For detailed steps and instructions, see Create a cluster Important: If you are using the Couchbase Capella free trial, you must convert it to a paid account before beginning your migration. To convert your account, open the Billing section of the Couchbase Capella Control Plane, and then choose Add Activation ID. The Activation ID is sent to your billing contact email address after you complete a purchase agreement with Couchbase Sales, or after you make a purchase through AWS Marketplace | Couchbase administrator |
Create a database credential user. | A database credential user is specific to a cluster and consists of a user name, password, and a set of bucket privileges. This user is required for creating buckets and accessing bucket data. In the Couchbase Capella Control Plane, create a database credential for the new cluster by following the instructions in Configure database credentials Note: An organization user needs organizational role credentials assigned to them if they want to access bucket data on a particular cluster, either remotely or through the Couchbase Capella UI. This is separate from database credentials, which are typically used by apps and integrations. Creating the organizational user allows you to create and manage the target buckets on your Couchbase Capella cluster. | Couchbase administrator |
If using migration option 2, install Couchbase Shell. | You can install Couchbase Shell on any system that has network access to both your self-managed Couchbase Server and the Couchbase Capella clusters. For more information, see Install Couchbase Shell version 1.0.0-beta.5 Confirm that Couchbase Shell is installed by testing a connection to your self-managed cluster | Couchbase administrator, Systems administrator |
Allow IP addresses. |
For more information about allowed IP addresses, see Configure allowed IP addresses | Couchbase administrator, Systems administrator |
Configure certificates. |
| Couchbase administrator, Systems administrator |
Create the configuration file for Couchbase Shell. | Create a configuration dotfile in the Couchbase Shell installation’s home directory (for example, Add connection properties for the source and target clusters to the configuration file. You can use the example configuration file that’s in the Additional information section and edit the settings for your clusters. Save the configuration file with the updated settings to the | Couchbase administrator, Systems administrator |
Create target buckets. | For each source bucket, create one target bucket in your Couchbase Capella cluster by following the instructions in Create a bucket Your target bucket configurations must match the bucket names, memory settings, and conflict resolution settings of the buckets in your self-managed Couchbase Server cluster. | Couchbase administrator |
Create scopes and collections. | Every bucket contains a default scope and collection with the keyspace
| Couchbase administrator |
Task | Description | Skills required |
---|---|---|
Open TCP ports on the self-managed Couchbase Server cluster nodes. | Make sure that the appropriate ports are open for XDCR communication on the self-managed Couchbase Server cluster's nodes. For more information, see the Couchbase Server ports documentation | Couchbase administrator, Systems administrator |
If you are using Couchbase Server Enterprise Edition, set up Couchbase XDCR. |
| Couchbase administrator |
Start Couchbase XDCR. |
| Couchbase administrator |
Task | Description | Skills required |
---|---|---|
Migrate self-managed cluster indexes to Couchbase Capella. | Important: We recommend this process if you have fewer than 50 indexes to migrate. If you have more than 50 indexes to migrate, we recommend that you use migration option 2.
| Couchbase administrator, Systems administrator |
Task | Description | Skills required |
---|---|---|
Migrate the index definitions. | Important: We recommend this process if you have more than 50 indexes to migrate. If you have fewer than 50 indexes to migrate, we recommend that you use migration option 1.
| Couchbase administrator, Systems administrator |
Build the index definitions. |
| Couchbase administrator, Systems administrator |
Task | Description | Skills required |
---|---|---|
Migrate self-managed cluster full-text search indexes to Couchbase Capella. |
| Couchbase administrator |
Task | Description | Skills required |
---|---|---|
Export data from self-managed Couchbase Server Community Edition. | Encrypted XDCR is not available in Couchbase Community Edition. You can export data from Couchbase Community Edition and then manually import the data into Couchbase Capella. To export data from the source bucket, use The following command is provided as an example.
Note that | Couchbase administrator |
Import data into Couchbase Capella. |
For large files, Couchbase Capella supports command line import using cURL. You can explore Import options in more detail at Import data | Couchbase administrator |
Task | Description | Skills required |
---|---|---|
Verify data migration. |
| Couchbase administrator |
Verify index migration. | In the Couchbase Capella Control Plane, in the Tools dropdown list for your target cluster, choose Indexes. Verify that the indexes are migrated and built. | Couchbase administrator |
Verify query results. |
| Couchbase administrator |
Verify full-text search results (applicable if you migrated FTS indexes). |
| Couchbase administrator |
Related resources
Prepare the migration
Migrate the data and indexes
Couchbase Capella SLAs and support
Additional information
The following code is an example configuration file for Couchbase Shell
Version = 1 [[clusters]] identifier = "On-Prem-Cluster" hostnames = ["<SELF_MANAGED_COUCHBASE_CLUSTER>"] default-bucket = "travel-sample" username = "<SELF_MANAGED_ADMIN>" password = "<SELF_MANAGED_ADMIN_PWD>" tls-cert-path = "/<ABSOLUTE_PATH_TO_SELF_MANAGED_ROOT_CERT>" data-timeout = "2500ms" connect-timeout = "7500ms" query-timeout = "75s" [[clusters]] identifier = "Capella-Cluster" hostnames = ["<COUCHBASE_CAPELLA_ENDPOINT>"] default-bucket = "travel-sample" username = "<CAPELLA_DATABASE_USER>" password = "<CAPELLA_DATABASE_USER_PWD>" tls-cert-path = "/<ABSOLUTE_PATH_TO_COUCHBASE_CAPELLA_ROOT_CERT>" data-timeout = "2500ms" connect-timeout = "7500ms" query-timeout = "75s"
Before you save the configuration file, use the following table to make sure that you added your own source and target cluster information.
<SELF_MANAGED_COUCHBASE_CLUSTER> | Use the IP address for your self-managed Couchbase Server cluster. |
<SELF_MANAGED_ADMIN> | Use the administrator user for your self-managed Couchbase Server cluster. |
<ABSOLUTE_PATH_TO_SELF_MANAGED_ROOT_CERT> | Use the absolute path to the saved root certificate file for your self-managed Couchbase Server cluster. |
<COUCHBASE_CAPELLA_ENDPOINT> | Use the connection endpoint for your Couchbase Capella cluster. |
<CAPELLA_DATABASE_USER> | Use the database user for your Couchbase Capella cluster. |
<CAPELLA_DATABASE_USER_PWD> | Use the database user password for your Couchbase Capella cluster. |
<ABSOLUTE_PATH_TO_COUCHBASE_CAPELLA_ROOT_CERT> | Use the absolute path to the saved root certificate file for your Couchbase Capella cluster. |