influxdb 数据库 1.3.x 升级到 1.7.x 步骤
升级步骤
停止influxdb
systemctl stop influxdb
升级rpm
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.10.x86_64.rpm
yum install influxdb-1.7.10.x86_64.rpm
配置修改
- 修改influxdb配置文件
[data]
index-version = "inmem"
为 index-version = "tsi1"
,如果使用了环境变量,修改INFLUXDB_DATA_INDEX_VERSION=tsi1
- Delete shard index directories (by default, located at /<shard_ID>/index)
- Build TSI by running the influx_inspect buildtsi command
influx_inspect buildtsi -datadir <data_dir> -waldir <wal_dir> [ options ]
influx_inspect buildtsi -datadir /data/influxdb/data -waldir /data/influxdb/wal
chown influxdb.influxdb -R /data/influxdb/
启动服务
systemctl start influxdb