influxdb修改数据保留策略


influxdb修改数据保留策略

操作

# influx -username admin -password aaaaa
Connected to http://localhost:8086 version 1.8.3
InfluxDB shell version: 1.8.3

> show databases;
name: databases
name
----
_internal
test

>use test
> SHOW RETENTION POLICIES ON test;
name    duration  shardGroupDuration replicaN default
----    --------  ------------------ -------- -------
autogen 8760h0m0s 168h0m0s           1        true

> alter RETENTION POLICy "autogen" on "test" duration 90d replication 1 default;
> SHOW RETENTION POLICIES ON test;
name    duration  shardGroupDuration replicaN default
----    --------  ------------------ -------- -------
autogen 2160h0m0s 168h0m0s           1        true