I’m trying to move a full backup of a running influxdb to another machine. I did the following.
I backed up all data from my influx, version 2.0.4, by issuing:
$ influx backup --host http://localhost:8086 backup/
Obs: Omitting --host
but giving the --token
gives me Error: Unauthorized access.
. So I kept --host
and it was enough for influx backup
to work.
In that directory there is:
$ ls backup
20210513T141340Z.bolt 20210513T141340Z.s17.tar.gz
20210513T141340Z.manifest 20210513T141340Z.s18.tar.gz
20210513T141340Z.s10.tar.gz 20210513T141340Z.s1.tar.gz
20210513T141340Z.s11.tar.gz 20210513T141340Z.s2.tar.gz
20210513T141340Z.s12.tar.gz 20210513T141340Z.s3.tar.gz
20210513T141340Z.s13.tar.gz 20210513T141340Z.s4.tar.gz
20210513T141340Z.s14.tar.gz 20210513T141340Z.s5.tar.gz
20210513T141340Z.s15.tar.gz 20210513T141340Z.s6.tar.gz
20210513T141340Z.s16.tar.gz
Now at the machine where I will restore
I copied all files from the first machine to a local path using scp
:
$ scp machinetobackupfrom@ip:/path/to/backup/* /local/path/to/backup/
I extracted influx binaries:
$ tar xvfz influxdb2-2.0.4-linux-amd64.tar.gz
Current directory looks like this:
$ ls
backup
influxdb2-2.0.4-linux-amd64
influxdb2-2.0.4-linux-amd64.tar.gz
config.yaml
My config.yaml is:
$ cat config.yaml
engine-path: /data/influxdbv2/engine
http-bind-address: ":8085"
bolt-path: /data/influxdbv2/influxd.bolt
I have cleaned /data/influxdbv2/
directory:
$ rm -r /data/influxdbv2/*
When I try to restore the data I get this error:
$ influxdb2-2.0.4-linux-amd64/influx restore --full --input backup
Error: must specify path to backup directory
See 'influx restore -h' for help
Then I tried to restore the data with influxd running.
I go through influxd setup
and start my influx like this, as it reads the config.yaml
file at current directory:
$ influxdb2-2.0.4-linux-amd64/influxd
I tried to restore the data again but I get the same Error: must specify path to backup directory
.
Even using full path for --input
I get that error.
$ influxdb2-2.0.4-linux-amd64/influx restore --full --input $(pwd)/backup
Error: must specify path to backup directory
See 'influx restore -h' for help
Removing the --input
flag gives the same error. It’s clearly not reading this flag.
I have download version 2.0.6 and retried to restore my backup but I still get the same error.
I have no idea what I am doing wrong.