I’m trying to restore a backup of influxdb on new hardware. The backup was made december 23rd of 2019. After this date my laptop crashed and I only just started on new hardware.
Openhab is persisting to influx alright, I can see the new data with influxdbStudio so influx is alright.
I read this info here v1.8/administration/backup_and_restore/
I stopped the database: sudo services influxdb stop. (Running Habian on Debian 10)
Then I would like to restore first to a new db just to test the procedure. If necessary I will drop current db and copy the backup in into ‘openhab_db’
But I run into this problem:
sudo influxd restore -online -db openhab_db -newdb backup /home/habian/Documents/myinfluxbackup/
2020/04/24 21:15:58 error updating meta: no metastore backups in /home/habian/Documents/myinfluxbackup/
restore: no metastore backups in /home/habian/Documents/myinfluxbackup/
When I look into the backupdirectory I do see 20191223T145407Z.manifest, 20191223T145407Z.meta, and several .tar.gz -files, so I would imagine the meta-store that the error message is all about is in place?
I tryed with sudo too, no help. Does anybody know what I do wrong?
Did you backup with the -portable flag as the page you link recommends? If you did, I think you need the portable flag to restore as shown in that page:
If you didn’t use the -portable to backup, then you probably need to restore the metastore first, then the data. Instructions are in the legacy section of the link you provided.
Thanx John,
I really don’t remember how I did it and what version I was on end of 2019.
I tried restore with both -portable and -online with same results.
Thanks for pointing to the separate metadata-restore thing, I didn’t get that reading the first time. So I did this:
$ influxd restore -metadir /var/lib/influxdb/meta /home/habian/Documents/myinfluxbackup/ restore: no metastore backups in /home/habian/Documents/myinfluxbackup/
While in this directory I clearly have a file named 'meta
$ ls /home/habian/Documents/myinfluxbackup/
20191223T145407Z.manifest
20191223T145407Z.meta
20191223T145407Z.s597.tar.gz
I also tried with ‘sudo’ since I always struggle if this is needed or not, but that doesn’t help either.
UPDATE: I forgot to mention that with -portabe I do get another error:
Also about meta, but with connection-error. I figured it’s another way of telling the same story, but maybe you can make more logic from this?
I did comment-out this line in /etc/influxdb/influxdb.conf:
bind-address = “127.0.0.1:8088”