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:
-
Open the database’s Settings tab to the Buckets page:
-
With the Projects tab in your organization open, click the project with the database you’re working with.
-
With the Databases tab open, select your database.
-
Click the Settings tab.
-
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.
-
Open the database’s Settings tab to the Buckets page:
-
With the Projects tab in your organization open, click the project with the database you’re working with.
-
With the Databases tab open, select your database.
-
Click the Settings tab.
-
In the navigation menu, click Buckets.
-
-
Click Create Bucket.
-
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. -
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.
-
Choose the conflict resolution method for the bucket.
-
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.
-
-
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. -
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.
-
-
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.
-
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. -
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).
-
Choose a backup schedule for the bucket according to the relative importance of the workload and data.
-
Select Do Not Backup to not schedule any backups.
Do Not Backup is not recommended for production databases. It’s intended for development databases or similar. To set a weekly incremental schedule, see the steps which follow.
-
Choose Set Weekly Schedule.
-
Choose the Day of the week when you want Capella to take the full backup. The default value is
Sunday
. -
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.
-
Use the Incremental Every list to set the frequency of incremental backups.
If you change the Start at time, the next incremental backup might happen at a different time than you expect. Capella calculates the Incremental Value backward from the configured Start at time.
For example, 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 change the Start at to 6 AM, you would see another incremental backup at 10 PM, 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. -
Select Cost Optimized Retention. When selected, the cost optimized retention policy applies to your bucket backup. For more information, see Cost Optimized Retention Policy.
-
Set a Retention Time in line with your data retention policy.
If you selected Cost Optimized Retention, the Retention Time applies only to the monthly restore point.
Capella preserves each backup from
30 Days
to5 Years
. After the retention time lapses, Capella schedules the backup for deletion.The Retention Time setting applies to all future backups for a bucket. Changes to this setting do not affect previous backups.
-
-
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.
-
Open the database’s Settings tab to the Buckets page:
-
With the Projects tab in your organization open, click the project with the database you’re working with.
-
With the Databases tab open, select your database.
-
Click the Settings tab.
-
In the navigation menu, click Buckets.
-
-
Click the name of the bucket you want to modify.
-
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.
-
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. |
-
Open the database’s Settings tab to the Buckets page:
-
With the Projects tab in your organization open, click the project with the database you’re working with.
-
With the Databases tab open, select your database.
-
Click the Settings tab.
-
In the navigation menu, click Buckets.
-
-
Click the name of the bucket you want to delete.
-
Click Delete Bucket.
This opens the Delete Bucket dialog.
-
Verify you’ve chosen the correct bucket and then type
delete
into the provided field. -
Click Delete Bucket.
Upon successful deletion, the bucket and all its data are deleted from the database.