2.0 KiB
2.0 KiB
title | seotitle | description | menu | weight | aliases | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Create a bucket | Create a bucket in InfluxDB | Create buckets to store time series data in InfluxDB using the InfluxDB UI or the influx CLI. |
|
201 |
|
Use the InfluxDB user interface (UI) or the influx
command line interface (CLI)
to create a bucket.
Create a bucket in the InfluxDB UI
There are two places you can create a bucket in the UI.
Create a bucket from the Load Data menu
-
In the navigation menu on the left, select Data (Load Data) > Buckets.
{{< nav-icon "data" >}}
-
Click {{< icon "plus" >}} Create Bucket in the upper right.
-
Enter a Name for the bucket.
-
Select when to Delete Data:
- Never to retain data forever.
- Older than to choose a specific retention policy.
-
Click Create to create the bucket.
Create a bucket in the Data Explorer
-
In the navigation menu on the left, select *Explore (Data Explorer).
{{< nav-icon "data-explorer" >}}
-
In the From panel in the Flux Builder, select
+ Create Bucket
. -
Enter a Name for the bucket.
-
Select when to Delete Data:
- Never to retain data forever.
- Older than to choose a specific retention policy.
-
Click Create to create the bucket.
Create a bucket using the influx CLI
Use the influx bucket create
command
to create a new bucket. A bucket requires the following:
- bucket name
- organization name or ID
- 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 (
# Syntax
influx bucket create -n <bucket-name> -o <org-name> -r <retention-period-duration>
# Example
influx bucket create -n my-bucket -o my-org -r 72h