Influxdb: Restore InfluxDB using only TSM file

Created on 11 Aug 2017  路  3Comments  路  Source: influxdata/influxdb

Hello,

I made a blunder. I tried to restore my Infuxdb from another server into my AWS server without taking a backup and my old data got deleted. Now when I am looking into the /data/autogen directory I am able to see all the tsm files. But some how that database is not showing up in the InfluxDB. Is there any way to restore all the data from TSM file?

Most helpful comment

This is a problem that some of the influxDB support people also didn't have..at least I could not find. The point is that if we can restore the database if the meta files are messed up. Because cross system backup and restore only merges the tsm files but replaces the meta files. Now if your meta files are messed up, you can't get data even if you have all your TSM files intact. But there is a solution

influx_inspect export -database dbname -datadir path -waldir path -out exportfile.txt
influx -import -path=exportfile.txt

All 3 comments

This is a problem that some of the influxDB support people also didn't have..at least I could not find. The point is that if we can restore the database if the meta files are messed up. Because cross system backup and restore only merges the tsm files but replaces the meta files. Now if your meta files are messed up, you can't get data even if you have all your TSM files intact. But there is a solution

influx_inspect export -database dbname -datadir path -waldir path -out exportfile.txt
influx -import -path=exportfile.txt

@MayukhSobo Thanks, this saved me!

Thanks a lot for this... with this i can recover my lost databases from my TSM files !!...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jayannah picture jayannah  路  3Comments

dandv picture dandv  路  3Comments

shilpapadgaonkar picture shilpapadgaonkar  路  3Comments

ricco24 picture ricco24  路  3Comments

davidgubler picture davidgubler  路  3Comments