Rename a database
Use the influxctl database rename
command
to rename a database in your InfluxDBed cluster.
Renaming a database does not change the database ID, modify data in the database, or update database tokens. After renaming a database, any existing database tokens will stop working and you must create new tokens with permissions for the renamed database.
Rename a database using the influxctl CLI
influxctl database rename DATABASE_NAME NEW_DATABASE_NAME
Replace the following:
DATABASE_NAME
: Current name of the database to renameNEW_DATABASE_NAME
: New name for the database
Update database tokens after renaming
After renaming a database, existing database tokens will no longer work because they reference the old database name. Do the following:
- Create new database tokens with permissions for the renamed database.
- Update your applications and clients to use the new tokens.
- Delete the old database tokens that reference the old database name.
Renamed database retains its ID
The database ID remains the same after renaming. When you list databases, you’ll see the new name associated with the original database ID.
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 Clustered 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.