influx bucket create
influx bucket create command creates a bucket in InfluxDB.
influx bucket create [flags]
|Flag||Description||Input type||Maps to ?|
|CLI configuration to use for command||string|
|Path to ||string|
|Help for the |
|Hide table headers (default |
|HTTP address of InfluxDB (default ||string|
|Output data as JSON (default |
|Organization name (mutually exclusive with ||string|
|Organization ID (mutually exclusive with ||string|
|Duration bucket retains data (0 is infinite, default is 0)||duration|
|Bucket shard group duration (OSS only)||string|
|Skip TLS certificate verification|
--retention units are nanoseconds (
ns), microseconds (
ms), seconds (
s), minutes (
m), hours (
h), days (
d), and weeks (
The examples below assume your InfluxDB host, organization, and token are
provided by the active
influx CLI configuration.
If you do not have a CLI configuration set up, use the appropriate flags to provide these required credentials.
- Create a bucket with infinite data retention
- Create a bucket that retains data for 30 days
- Create a bucket with a description
- Create a bucket with a custom shard group duration
Create a bucket with infinite data retention
influx bucket create --name example-bucket
Create a bucket that retains data for 30 days
influx bucket create \ --name example-bucket \ --retention 30d
Create a bucket with a description
influx bucket create \ --name example-bucket \ --description "Example bucket description"
Create a bucket with a custom shard group duration
Custom shard group durations are only supported in InfluxDB OSS. The shard group duration must be shorter than the bucket’s retention period. For more information, see InfluxDB shards and shard groups.
influx bucket create \ --name example-bucket \ --retention 30d \ --shard-group-duration 2d
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, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.