Documentation

Update a database

Limited availability

InfluxDB Clustered is currently only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.

Use the influxctl database update command to update a database in your InfluxDB cluster.

  1. If you haven’t already, download and install the influxctl CLI.

  2. Run the influxctl database update command and provide the following:

    • Database name
    • Optional: Database retention period (default is infinite)
    • Optional: Database table (measurement) limit (default is 500)
    • Optional: Database column limit (default is 250)
influxctl database update 
DATABASE_NAME
\
--retention-period
30d
\
--max-tables
500
\
--max-tables 250

Database names can’t be updated

The influxctl database update command uses the database name to identify which database to apply updates to. The database name itself can’t be updated.

Retention period syntax

Use the --retention-period flag to define a specific retention period for the database. The retention period value is a time duration value made up of a numeric value plus a duration unit. For example, 30d means 30 days. A zero duration retention period is infinite and data will not expire. The retention period value cannot be negative or contain whitespace.

Valid durations units include
  • m: minute
  • h: hour
  • d: day
  • w: week
  • mo: month
  • y: year
Example retention period values
  • 0d: infinite/none
  • 3d: 3 days
  • 6w: 6 weeks
  • 1mo: 1 month (30 days)
  • 1y: 1 year
  • 30d30d: 60 days
  • 2.5d: 60 hours

Database naming restrictions

Database names must adhere to the following naming restrictions:

  • Must contain two or more characters
  • Cannot start with an underscore (_)
  • Cannot contain whitespace characters, double quotes ("), or percent signs (%)

InfluxQL DBRP naming convention

In InfluxDB 1.x, data is stored in databases and retention policies. In InfluxDB Clustered, databases and retention policies have been merged into databases, where databases have a retention period, but retention policies are no longer part of the data model. Because InfluxQL uses the 1.x data model, a database must be mapped to a v1 database and retention policy (DBRP) to be queryable with InfluxQL.

When naming a database that you want to query with InfluxQL, use the following naming convention to automatically map v1 DBRP combinations to a database:

database_name/retention_policy_name
Database naming examples
v1 Database namev1 Retention Policy nameNew database name
dbrpdb/rp
telegrafautogentelegraf/autogen
webmetrics1w-downsampledwebmetrics/1w-downsampled

Table and column limits

In InfluxDB Clustered, table (measurement) and column limits can be configured using the --max-tables and --max-columns flags. Each measurement is represented by a table. Time, fields, and tags are each represented by a column.

Default maximum number of tables: 500
Default maximum number of columns: 250

Setting table and column limits above the default limits may adversely affect database performance.


Was this page helpful?

Thank you for your feedback!


Introducing InfluxDB Clustered

A highly available InfluxDB 3.0 cluster on your own infrastructure.

InfluxDB Clustered is a highly available InfluxDB 3.0 cluster built for high write and query workloads on your own infrastructure.

InfluxDB Clustered is currently in limited availability and is only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.

Learn more
Contact InfluxData Sales

The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following:

State of the InfluxDB Cloud Serverless documentation

InfluxDB Cloud Serverless documentation is a work in progress.

The new documentation for InfluxDB Cloud Serverless is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.