Manage Buckets

    +
    Buckets, which clusters use to store data, can be created, edited, and deleted.

    The page describes how you can interact with and manage buckets in a Couchbase cluster using the Capella UI.

    Accessing Buckets in the Capella UI

    To access buckets in the Capella UI, you must have the Project Owner or Cluster Manager role for the project that contains the cluster with the buckets that you want to access. If you have the Organization Owner role, you already have Project Owner access.

    All buckets in a cluster are viewed and managed under a cluster’s Buckets tab.

    A cluster’s 'Buckets' tab showing a table of multiple buckets.

    Buckets Summary

    The Buckets tab displays a summary of all the buckets on the cluster. The summary is displayed in a table format, with sortable columns and a row for each bucket.

    The buckets summary displays the following information about each bucket:

    Bucket
    Items
    Ops/sec
    Memory Used
    Disk Used

    A More options () button is displayed at the end of each row. This button provides access to the scopes, collections, and documents in the bucket. Additionally, it includes actions to trigger a manual backup now, trigger a flush (when enabled), and delete the bucket.

    If you’re using Couchbase Server 6.6, hosted with your own cloud provider, instead of the More options button a Trash icon () is displayed at the end of each row. This can be used to delete the bucket.

    Create a Bucket

    To create a bucket, you must have the Project Owner or Cluster Manager role for the project that contains the cluster on which you are creating the bucket. If you have the Organization Owner role, you already have Project Owner access.

    1. Open the cluster’s Buckets tab.

      1. If it’s not already open, go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that you wish to add a bucket to.

        This opens the cluster with its Metrics tab selected.

      3. Click the Buckets tab.

    2. Click Create Bucket.

      This opens the Create Bucket fly-out menu.

    3. Specify a name for the bucket.

      1. In the Bucket Name field, enter a name for the bucket.

        A bucket name can only contain upper or lower case letters, numbers, underscores (_), periods (.), dashes (-), and percentages (%). They cannot exceed 100 characters in length and cannot be changed after the bucket is created.

      2. Click Next.

    4. Specify an appropriate memory quota for the bucket.

      In the Memory Per Server Per Node (MiB) field, enter the amount of memory that is to be allocated to the bucket. (A minimum of 100 MB is required.)

      The memory allocation graph shows memory allocated to other buckets in the cluster and the total amount of memory in the cluster that can be allocated new buckets. The amount of memory for your new bucket cannot exceed the remaining memory in the cluster.

      In Couchbase Capella, the amount of memory that you specify for a bucket gets evenly divided across all Data Service nodes in the cluster. Should the number of Data Service nodes in the cluster change in the future, the total amount of memory allocated to the bucket will remain the same — it will just get re-divided across the new number of Data Service nodes.

      This behavior is different from the traditional memory quota model in Couchbase Server. In that model, the amount of memory you specify gets allocated on each Data Service node individually, and the total amount of memory allocated to a bucket goes up and down whenever a Data Service node is added or removed from the cluster.

    5. Choose the Backup Schedule for the bucket.

      1. Choose between a Weekly Schedule or Daily Schedule according to the relative importance of the workload and data.

        The No Backup option is not recommended for production clusters. It is intended only for development clusters or similar situations.
      2. (Weekly Schedule only) Set the Day of the week to when you want the full backup to be taken. The default value is Sunday.

      3. Set the Start at time of day for the full backup to be taken.

        Preferably, this should be a time when your application is not making heavy use of Capella unless you have chosen a VM with more capacity than you are likely to need.

        This setting uses your local time zone. You can verify the timezone used by your Couchbase Capella account by reviewing your account preferences.
      4. Set the Incremental Every setting to configure the frequency for incremental backups.

        Depending on the schedule you have chosen, this setting can range from 4 Hours to 1 Day.

        If you change the Start at time, the next Incremental backup may occur at a different time than you might expect. This is because the Incremental Value is calculated backward from the configured Start at time.

        For example, let’s say Incremental Every is currently set to 8 hours, and Start at is set to 4:00 am. If the current time is 9:00 pm, you would see that an Incremental backup was taken at 8:00 pm (an eight-hour interval backward from 4:00 am). If you were to then change the Start at to 6:00 am, you would see another Incremental backup taken at 10:00 pm — just two hours after the last backup. This new backup occurs at this time because the eight-hour backup interval was recalculated back from the new 6:00 am Incremental Every value to 10:00 pm.

      5. Set the Retention Time so that it is in line with your data retention needs and practices.

        The amount of time each backup is preserved can range from 30 Days to 5 Years. After this time period lapses, the backup is deleted.

        The Retention Time setting applies to all future backups for a bucket. Previous backups are unaffected by changes to this setting.

        For more information on backups, refer to the Backup and Restore section.

      6. Click Next.

    6. Choose the conflict resolution method for the bucket.

      1. Choose between Timestamp or Sequence number methods of conflict resolution for the bucket.

        A conflict occurs during XDCR, when a document has been modified in different ways in different locations; necessitating that one of the versions be chosen for retention, and the other discarded. There are two methods for making this choice: Sequence number and Timestamp. The method you choose is permanently set for the bucket — it cannot be changed after you create the bucket. For information on the significance of each method, refer to XDCR Conflict Resolution.

    7. Choose the minimum durability level.

      This is the level of durability that each write to the bucket should be assigned as a minimum to improve data integrity during failures. To learn more about durability in Couchbase Server, see the Durability page.

      1. Choose between the following durability levels:

        • None

        • Replicate to Majority — The mutation must be replicated to (that is, held in the memory allocated to the bucket on) a majority of the Data Service nodes.

        • Majority and Persist to Active — The mutation must be replicated to a majority of the Data Service nodes. Additionally, it must be persisted (that is, written and synchronized to disk) on the node hosting the active vBucket for the data.

        • Persist to Majority — The mutation must be persisted to a majority of the Data Service nodes. Accordingly, it will be written to disk on those nodes.

    8. Set the number of replicas.

      Depending on the number of nodes in your cluster, you can choose between 1 and 3 replica copies of the data to be maintained for this bucket.

    9. Enable or disable Flush.

      You can choose to enable or disable (default) Flush on this bucket. Flushing a bucket deletes all of its data permanently.

      Due to the danger of data loss, it’s not recommended to enable Flush in production clusters.
    10. Enable or disable Time to Live (TTL).

      Enabling the Time to Live setting allows you to set a maximum amount of time a document will be allowed to exist in a bucket before it is automatically deleted. When enabled, this setting allows you to specify the time to live and the unit (seconds, minutes, hours, days, and weeks).

    11. Once you’re satisfied with the bucket configuration, click Create Bucket.

      Once the bucket is successfully created, it appears in the bucket summary table.

    After creating a bucket, certain settings can still be changed by modifying the bucket.

    Modify a Bucket

    You can modify most of the settings already established for an existing bucket.

    To modify a bucket, you must have the Project Owner or Cluster Manager role for the project that contains the cluster whose bucket you wish to modify. If you have the Organization Owner role, you already have Project Owner access.

    1. Go to the cluster’s Buckets tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that contains the bucket that you wish to modify.

        This opens the cluster with its Metrics tab selected.

      3. Click the Buckets tab.

    2. Find and click on the bucket that you wish to modify.

      This opens the bucket’s fly-out menu.

    3. Edit the bucket’s settings.

      Changes to a bucket can only be made one tab at a time. For example, if you make changes to the Memory tab and then switch to the Advanced Settings tab, those changes in the Memory tab will not be saved.

      You can edit the following bucket settings:

      Memory (MB)

      Edit the amount of memory allocated to the bucket. (A minimum of 100 MB is required.)

      Note that if you decide to lower this setting, the value you specify cannot be lower than the amount of memory currently being used by the bucket on any of the nodes in the cluster.

      For more information on changing the bucket’s memory settings, see the memory settings configuration instructions.

      Backup Schedule

      Change the backup schedule for the bucket.

      For more information on changing the bucket’s backup schedule, see the backup schedule instructions.

      Advanced Settings

      Change the minimum durability level, the number of replicas, enable or disable flush, and enable or disable Time to Live (TTL).

      For more information on changing the bucket’s advanced settings, see the instructions for configuring a bucket’s advanced settings.

    4. Once you’ve made the desired changes to the bucket’s settings, click Update.

    Delete a Bucket

    Deleting a bucket deletes all of its contents. Backups for a deleted bucket are still available for restore under the Backups tab depending on the bucket’s backup settings.

    Bucket deletion may be appropriate when an existing bucket is no longer needed or when all items within an existing bucket need to be replaced and bucket deletion (followed by bucket-recreation) is faster than deleting each item.

    To delete a bucket, you must have the Project Owner or Cluster Manager role for the project that contains the cluster whose bucket you wish to delete. If you have the Organization Owner role, you already have Project Owner access.

    If the bucket is the source of a replication, then the bucket will fail to be deleted. All replications for which the bucket is the source must be deleted before the bucket itself can be deleted.

    If the bucket is the destination of a replication, the bucket is allowed to be deleted. Any replications for which the bucket is the destination are automatically deleted after the bucket itself is deleted.

    1. Go to the cluster’s Buckets tab.

      1. Go to the Clusters tab in the main navigation.

      2. Find and click on the cluster that contains the bucket that you wish to delete.

        This opens the cluster with its Metrics tab selected.

      3. Click the Buckets tab.

    2. Find the bucket that you wish to delete, and click the More options () button at the end of the row on the right side.

    3. From the menu, click Delete Bucket.

      This opens the Delete Bucket fly-out menu.

    4. Verify that the correct bucket is chosen and then type delete into the provided field.

    5. Click Delete.

    Upon successful deletion, the bucket and all its data are deleted from the cluster.