Database location change help please

Hi, I want to change the location of my database
I edited influxdb.conf such that
dir = “/a/b/c/influxdb/meta”
dir = “/a/b/c/finfluxdb/data”
wal-dir = “/a/b/c/influxdeb/wal”

So I am changing it from the default /var/lib/influxdb/

I then copied the existing database contents to those folders.

But when I try to systemctl restart influxdb, i get:

run: create server: mkdir all: mkdir /a/b/c: file exists

Why is it trying to create folder c? I would have thought if anything it would try to create folders in /a/b/c/influxdb?

But regardless, I just want to migrate my database to this location, can someone help please?

What version of Influxdb are you using?

What operating system are you using?

It looks like you are using 1.X OSS. The failure is here in the master-1.x branch, from ensuring that the meta directory is present.

The failing call is os.MkDirAll, which according to the documentation does not fail if the directories it is creating exist. So, I’m guessing that you have a permissions issue, or one of the directories to be created already exists as a file, or something in your file system like that. The source for os.MkDirAll is here.

Thanks David. So does it need permissions to write to all folders i.e a, b, c? I dont have permissions to all those, only the influxdb folder which i thought would be sufficient…

I have not extensively tested the os.MkDirAll function in the Go libraries, so I am unsure exactly what permissions it needs on the path it has been asked to create. You would certainly be safe making all the directories in the specified meta directory path writable, but if you want more restrictive permissions, you could experiment.

It’s more that i dont have permissions and if i did i would be worried that it was trying to write to folder c…
Looks like i will need to expt
Thanks for your help, much appreciated