InfluxDB版本:1.6.3
我使用旧版备份格式创建了名为“ test.mydb”的数据库的备份:
influxd backup -database <mydatabase> <path-to-backup>
备份进行得很好,但是当我尝试还原时:
sudo influxd restore -db "test.mydb" -newdb "test.mydb" -datadir /var/lib/influxdb/data /home/ubuntu/influxdb/test.mydb/
我收到错误:
backup tarfile name incorrect format
。搜索后,我认为是由于
influxdb/cmd/influxd/restore/restore.go
中的这段代码:// should get us ["db","rp", "00001", "00"]
pathParts := strings.Split(filepath.Base(tarFile), ".")
if len(pathParts) != 4 {
return fmt.Errorf("backup tarfile name incorrect format")
}
它检查备份文件名中有多少个点。数量需要为4,但是由于我的数据库名称,文件有5个点。
有什么解决方法吗?
最佳答案
我没有找到解决此问题的最佳方法,因此我手动将数据复制并粘贴到InfluxDB。
关于influxdb - 由于数据库名称中的点而无法还原数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52604850/