Create a bucket
This page documents an earlier version of InfluxDB OSS. InfluxDB 3 Core is the latest stable version.
Use the InfluxDB user interface (UI), the influx
command line interface (CLI),
or the InfluxDB API to create a bucket.
Bucket limits
A single InfluxDB 2.7 OSS instance supports approximately 20 buckets actively being written to or queried across all organizations depending on the use case. Any more than that can adversely affect performance.
Use the influx bucket create
command
to create a new bucket.
Include the following flags with the command:
-n
,--name
: Bucket name (see Bucket naming restrictions)-o
,--org
or--org-id
: Organization name or ID-r
,--retention
: Bucket retention period (duration to keep data) in one of the following units:- nanoseconds (
ns
) - microseconds (
us
orµs
) - milliseconds (
ms
) - seconds (
s
) - minutes (
m
) - hours (
h
) - days (
d
) - weeks (
w
)
- nanoseconds (
The minimum retention period is one hour.
# Syntax
influx bucket create \
--name <bucket-name> \
--org <org-name> \
--retention <retention-period-duration>
# Example
influx bucket create \
--name my-bucket \
--org my-org \
--retention 72h
Bucket naming restrictions
Bucket names must adhere to the following naming restrictions:
- Must contain two or more characters
- Cannot start with an underscore (
_
) - Cannot contain a double quote (
"
)
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support. Customers using a trial license can email trial@influxdata.com for assistance.