Hey guys,
I'm quite new to influxdb. I'm currently working localy with influxdb. I changed my harddrive (hdd to sdd)
When I backup my old database with the command "influxd backup /path-to-old-db"
when i do: "influxd restore -config /path/to/influxdb.conf /pathtonew-harddrive" everything works perfectly. But the restored database does not show up, only the _internal db exists.
Whats the problem? Please help me.
Greetings from Germany
@TaylanT my understanding is that % influx backup ... backups only metadata, but not the data itself. Also, I suggest you to provide which version of InfluxDB and storage engine you're using, because it helps with analysis of possible issues :)
Cheers from Bayern! ;)
Actually, this has been improved and backups backup almost everything now :) Anyway, in my specific case, I had to supply correct -datadir and -metadir.
Thank you for your reply @zstyblik.
i'm working on linux mint 17.3, influx version InfluxDB shell 0.9.6.1, engine bz1
my datadir is _dir = "/var/lib/influxdb/data"_ and there i placed my backup. Same thing for the metadir. But the new database does not show up.
I edited the path in the /etc/influxd/influx.conf file, is this the right file to edit?
@TaylanT sorry, but I have (limited) experience only with TSM1 as backup of TSM1 is still being "polished". I have written all(two) steps in https://github.com/influxdata/influxdb/issues/5451. I hope it will help you at least a bit. Also, please note that influxdb must not be running during restore.
Backup and restore unfortunately does not work in 0.9.6 with bz1 engine. 0.10.0 fixed this to work with tsm1 shards. You'll need to upgrade to 0.10.0 and convert your shards using the conversion tool.
As a work-around, you can make a copy of your whole /var/lib/influxdb dir and restore that.
I'm having the same issue. I'm restoring from .10 to .10. The restore works, but the database doesn't show up.
the database restore exists in /var/lib/influxdb/data/
having the same issue as @Sahasrara . while the restore seems to work, the database doesn't show up! I'm doing this on mac osx
It was a while ago so I may not be remembering correctly, but I think it was mandatory to import the metadata first.
I ran into these same symptoms, and, yes, the metadata needs to be restored as one step, and the data restored as another. So, if the data's not there, make sure the meta data has been restored, too.
Most helpful comment
having the same issue as @Sahasrara . while the restore seems to work, the database doesn't show up! I'm doing this on mac osx