Changing Retention Time in InfluxDB 2 - WebGUI + Console
Learn how to modify retention time in InfluxDB 2, optimizing data storage and managing retention policies. Improve database performance.
Learn how to modify retention time in InfluxDB 2, optimizing data storage and managing retention policies. Improve database performance.
This step-by-step guide explains how to change the retention time in InfluxDB 2. Learn how to modify the duration for storing data, optimize storage space, and manage data retention policies. Improve search engine visibility with this SEO-optimized tutorial.
1. Access InfluxDB 2:
Open the InfluxDB 2 user interface in your web browser.
2. Navigate to Buckets:
Go to the "Buckets" section and select the desired bucket.
3. Modify Retention Time:
Click on "Manage" for the bucket and navigate to the "Retention" tab. Adjust the duration for storing data according to your needs.
4. Confirm Changes:
Save the changes and confirm the modification of the retention time.
5. Verify Retention Time:
Double-check the new retention time by viewing the bucket's settings or querying the InfluxDB database.
6. Apply to Existing Data:
If you want to apply the retention time changes to existing data, you can run a continuous query to rewrite the data into a new retention policy.
7. Monitor and Optimize:
Regularly monitor your InfluxDB storage usage and adjust retention policies as necessary to optimize storage space and manage data effectively.
1. Open Command Line Interface:
Launch your preferred command-line interface, such as Terminal or Command Prompt.
2. Access InfluxDB 2:
Connect to your InfluxDB 2 instance using the Influx CLI tool:
influx
3. Set Retention Policy:
Change the retention time by executing the following command
influx> alter retention policy <retention_policy_name> on <database_name> duration <duration>
Replace <retention_policy_name>
with the name of the retention policy you want to modify, <database_name>
with the name of your database, and <duration>
with the desired duration (e.g., "7d" for 7 days).
4. Verify Changes:
To ensure the retention time modification was successful, query the retention policies for your database:
influx> show retention policies on <database_name>
Verify that the new retention time is reflected in the results.
5. Apply to Existing Data:
If you want to apply the retention time changes to existing data, you can run a continuous query to rewrite the data into a new retention policy.
6. Monitor and Optimize:
Regularly monitor your InfluxDB storage usage and adjust retention policies as necessary to optimize storage space and manage data effectively.
The DynDNS service of IPv64.net is free of charge and usable in all common routers and systems.
You have the choice between many different domain names.
The IPv64.net Healthchecks monitor your services, servers and endpoints. Receive notifications when your services fail.
This monitoring service is free with all features.
Registration with IPv64 is free of charge and immediately available for you.
TP-Link Omada EAP245 ~ 71.33 € Show me | |
DrayTek Vigor167 (V167) ~ 98.89 € Show me |