Manage Buckets

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

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

      Accessing Buckets in the Capella UI

      Working with buckets in the Capella UI requires the Project Owner or Project Manager role for the project with the database. If you have the Organization Owner role, you have Project Owner access.

      To view database buckets:

      1. Open the database’s Settings tab to the Buckets page:

        1. With the Projects tab in your organization open, click the project with the database you’re working with.

        2. With the Databases tab open, select your database.

        3. Click the Settings tab.

        4. In the navigation menu, click Buckets.

      Buckets Summary

      The Buckets page is a summary of all the buckets in the database. It includes the following information about each bucket:

      Bucket Name
      Documents
      Storage
      Ops/Sec
      Disk
      Memory/Quota

      Clicking the name of a bucket opens its details page. The bucket details page shows information about the bucket’s configuration. These details include conflict resolution, minimum durability level, replica, flush, and time to live settings. For more information, see Modify a Bucket.

      Create a Bucket

      Creating a bucket in the Capella UI requires the Project Owner or Project Manager role for the project with the database. If you have the Organization Owner role, you have Project Owner access.

      1. Open the database’s Settings tab to the Buckets page:

        1. With the Projects tab in your organization open, click the project with the database you’re working with.

        2. With the Databases tab open, select your database.

        3. Click the Settings tab.

        4. In the navigation menu, click Buckets.

      2. Click Create Bucket.

      3. In the Bucket name field, enter a name for the new bucket.

        A bucket name can only contain upper or lower case letters, numbers, underscores (_), periods (.), dashes (-), and percentages (%). Bucket names can’t exceed 100 characters in length and you can’t change them after bucket creation.

      4. Specify an appropriate memory quota for the bucket.

        In the Memory Quota (MiB) field, enter the memory you’re allocating to the bucket. A minimum of 100 MB is required.

        The memory allocation graph shows the memory allocated to other buckets in the database and the total amount of memory in the database you can allocate to new buckets. The amount of memory for your new bucket can’t exceed the remaining memory in the database.

        In Couchbase Capella, the amount of memory you specify for a bucket gets evenly divided across all Data Service nodes in the database. If the number of Data Service nodes in the database changes, the total amount of memory allocated to the bucket remains the same—​it gets 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 or down whenever a Data Service node is added or removed from the database.

      5. Choose the conflict resolution method for the bucket.

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

          A conflict occurs during XDCR, when a document has been modified differently in different locations, requiring one version of the document to be kept and the other discarded. The two methods for making this choice include Sequence number and Timestamp. The method you choose is permanently set for the bucket and you can’t change it after bucket creation. For information about each conflict resolution method, see XDCR Conflict Resolution.

      6. 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

          Apply no durability level.

          Replicate to Majority

          Mutations replicate to a majority of the Data Service nodes.

          Majority and Persist to Active

          Mutations replicate to a majority of the Data Service nodes. They’re also persisted—​written and synchronized to disk—​on the node hosting the active vBucket for the data.

          Persist to Majority

          Mutations are persisted to a majority of the Data Service nodes. Accordingly, they’re written to disk on those nodes.

      7. Set the number of replicas.

        Depending on the number of database nodes, you can choose from one to three replica copies of the data for this bucket.

      8. 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 databases.
      9. Enable or disable Time to Live (TTL).

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

      10. Choose the backup schedule for the bucket.

        1. Choose Set Weekly Schedule, Set Daily Schedule, or Do Not Backup according to the relative importance of the workload and data.

          The Do Not Backup option isn’t recommended for production databases. It’s intended for development databases or similar situations.
        2. If you’ve chosen Set Weekly Schedule, choose the Day of the week when you want Capella to take the full backup. The default value is Sunday.

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

          Select a Start at time when your application isn’t using Capella heavily unless you’ve chosen a database configuration with more capacity than you need.

          This setting uses your local time zone. You can view the timezone used by your Couchbase Capella account by reviewing your account preferences.

        4. Use the Incremental Every list to set the frequency of incremental backups.

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

          If you change the Start at time, the next incremental backup might happen at a different time than you expect. This is because Capella calculates the Incremental Value backward from the configured Start at time.

          For example, suppose Incremental Every is 8 hours, and the Start at time is 4 AM. If the current time is 9 PM, Capella takes an incremental backup at 8 PM, an eight-hour interval backward from 4 AM. If you were to then change the Start at to 6 AM, you would see another incremental backup at 10 PM—​just two hours after the last backup. The backup occurs at this time because Capella recalculates the eight-hour backup interval back from the new 6 AM Start at time.

        5. Set the Retention Time so that it’s in line with your data retention practices.

          How long Capella can preserve each backup ranges from 30 Days to 5 Years. After the chosen retention time lapses, Capella deletes the backup.

          The Retention Time setting applies to all future backups for a bucket. Changes to this setting don’t affect previous backups.

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

      Modify a Bucket

      You can modify most of a bucket’s settings after its creation.

      To modify a bucket, you need the Project Owner or Project Manager role for the project with the database. If you have the Organization Owner role, you have Project Owner access.

      1. Open the database’s Settings tab to the Buckets page:

        1. With the Projects tab in your organization open, click the project with the database you’re working with.

        2. With the Databases tab open, select your database.

        3. Click the Settings tab.

        4. In the navigation menu, click Buckets.

      2. Click the name of the bucket you want to modify.

      3. Edit the bucket’s settings.

        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.

        If you lower this setting, your value can’t be lower than the memory used by the bucket on any of the nodes in the database.

        For more information, see the memory settings configuration instructions.

        Minimum Durability Level

        Choose a new minimum durability level. For more information, see the durability configuration instructions

        Number of Replicas

        Choose the number of copies of this bucket’s data that Capella creates and maintains.

        Flush

        Choose to enable or disable flush. For more information, see the flush configuration instructions

        Time to Live

        Choose to enable or disable time to live. For more information, see the time to live 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.

      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 to restore under the Backup tab depending on the bucket’s backup settings.

      Bucket deletion may be appropriate when a bucket is no longer needed or when all items within a bucket need to be replaced. In such cases, bucket deletion followed by bucket recreation is faster than deleting each item.

      To delete a bucket, you need the Project Owner or Project Manager role for the project with the database. If you have the Organization Owner role, you have Project Owner access.

      If the bucket is the source of a replication, then the bucket deletion fails. 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. Open the database’s Settings tab to the Buckets page:

        1. With the Projects tab in your organization open, click the project with the database you’re working with.

        2. With the Databases tab open, select your database.

        3. Click the Settings tab.

        4. In the navigation menu, click Buckets.

      2. Click the name of the bucket you want to delete.

      3. Click Delete Bucket.

        This opens the Delete Bucket dialog.

      4. Verify you’ve chosen the correct bucket and then type delete into the provided field.

      5. Click Delete Bucket.

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