Upgrading from 1.x to 2.7 on Windows

I have been using Influx DB 1.8 on my Windows server for several years now.

New implementations require Influx 2 , so I decided to upgrade.

Downloaded the windows 64 binary and extracted the only exe file “influxd.exe” available.

I ran it with the “upgrade” parameter as I read in the upgrade documentation.

It could not find the db path:

PS C:\Program Files\influxdata> .\influxd.exe upgrade
Error: 1.x DB dir ‘C:\Users\xeonm.influxdb’ does not exist
See ‘influxd -h’ for help
PS C:\Program Files\influxdata>

OK. I used this parameter :

PS C:\Program Files\influxdata> .\influxd.exe upgrade --v1-dir .\influxdb-data

Then it starts to copy data. However; It stops at some point.

It says the ““error”:“error copying v1 data from influxdb-data\wal\router\autogen to C:\Users\xeonm\.influxdbv2\engine\wal\7f6f4e7ca3682d3c\autogen: CreateFile influxdb-data\wal\router\autogen: The system cannot find the path specified.”,“stacktrace”:“

Here is the full output:

Setup with these parameters?
Username: admin
Organization: ice
Bucket: home
Retention Period: infinite
Yes
{“level”:“info”,“ts”:1758775247.0898995,“caller”:“upgrade/setup.go:73”,“msg”:“CLI config has been stored.”,“path”:“C:\Users\xeonm\.influxdbv2\configs”}
{“level”:“info”,“ts”:1758775247.0898995,“caller”:“upgrade/database.go:202”,“msg”:“Checking available disk space”}
{“level”:“info”,“ts”:1758775247.3810542,“caller”:“upgrade/database.go:223”,“msg”:“Computed disk space”,“free”:“160 GB”,“required”:“8.0 GB”}
? Proceeding will copy all V1 data to “C:\Users\xeonm\.influxdbv2”
Space available: 160 GB
Space required: 8.0 GB
Yes
{“level”:“info”,“ts”:1758775249.737536,“caller”:“upgrade/database.go:51”,“msg”:“Upgrading databases”}
{“level”:“info”,“ts”:1758775249.7445388,“caller”:“upgrade/database.go:101”,“msg”:“Creating mapping”,“database”:“home”,“retention policy”:“autogen”,“orgID”:“95b9dc1bc0b31724”,“bucketID”:“4f99dcab5d2e6857”}
{“level”:“info”,“ts”:1758775253.863434,“caller”:“upgrade/database.go:101”,“msg”:“Creating mapping”,“database”:“router”,“retention policy”:“autogen”,“orgID”:“95b9dc1bc0b31724”,“bucketID”:“fccf91367fb1f7ff”}
{“level”:“error”,“ts”:1758775269.5488245,“caller”:“upgrade/upgrade.go:467”,“msg”:“Database upgrade error, removing data”,“error”:“error copying v1 data from influxdb-data\wal\router\autogen to C:\Users\xeonm\.influxdbv2\engine\wal\fccf91367fb1f7ff\autogen: CreateFile influxdb-data\wal\router\autogen: The system cannot find the path specified.”,“stacktrace”:“github.com/influxdata/influxdb/v2/cmd/influxd/upgrade.runUpgradeE\n\t/root/project/cmd/influxd/upgrade/upgrade.go:467\ngithub.com/influxdata/influxdb/v2/cmd/influxd/upgrade.NewCommand.func1\n\t/root/project/cmd/influxd/upgrade/upgrade.go:157\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887\nmain.main\n\t/root/project/cmd/influxd/main.go:61\nruntime.main\n\t/go/src/runtime/proc.go:272”}
{“level”:“error”,“ts”:1758775269.5516126,“caller”:“upgrade/upgrade.go:469”,“msg”:“Unable to remove bolt database”,“error”:“remove C:\Users\xeonm\.influxdbv2\influxd.bolt: The process cannot access the file because it is being used by another process.”,“stacktrace”:“github.com/influxdata/influxdb/v2/cmd/influxd/upgrade.runUpgradeE\n\t/root/project/cmd/influxd/upgrade/upgrade.go:469\ngithub.com/influxdata/influxdb/v2/cmd/influxd/upgrade.NewCommand.func1\n\t/root/project/cmd/influxd/upgrade/upgrade.go:157\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887\nmain.main\n\t/root/project/cmd/influxd/main.go:61\nruntime.main\n\t/go/src/runtime/proc.go:272”}
Error: error copying v1 data from influxdb-data\wal\router\autogen to C:\Users\xeonm.influxdbv2\engine\wal\fccf91367fb1f7ff\autogen: CreateFile influxdb-data\wal\router\autogen: The system cannot find the path specified.
See ‘influxd -h’ for help
PS C:\Program Files\influxdata>

Mostly likely due to missing expected directory in your 1.x data structure (influxdb-data - data, wal, meta and wal’s subdirectories etc). The upgrade process requires all expected directories to be present.

Ok but this is my working data directory. If something is missing, how does it work ?

It works totally fine with Influx 1

And if it is missing something that’s not required on runtime, then how can I repair the directories ? There should be a way to import to Influx 2 , right ?

You might find discussion here helpful;: Move data from Influx V1 to Influx V2 - #10 by wfjm

Or use Node-RED: