backrest icon indicating copy to clipboard operation
backrest copied to clipboard

Migration 4 failed on sqlite

Open Sneer opened this issue 1 year ago • 2 comments

Describe the bug When i upgraded docker to v1.8.0 it was failing with sqlite migration

To Reproduce Steps to reproduce the behavior:

Change tag from v1.7.3 to v1.8.0 and run docker compose up -d But this one was running in Unraid nad was using latest tag.

Expected behavior Upgrading tag would be smooth :)

Screenshots If applicable, add screenshots to help explain your problem.

Platform Info

Unraid 6.12.14

Additional context

Setting tag to v1.7.3 allowed me to run container with no issues. Logs:

{"level":"info","ts":1743760859.602119,"msg":"shutting down orchestrator loop, context cancelled."}
{"level":"info","ts":1743760860.1456738,"msg":"backrest version 1.8.0@1775862ac2dfc6879a3b8acd32fae9d96c9c063c, using log directory: /data/processlogs"}
{"level":"info","ts":1743760860.1649756,"msg":"restic binary \"/bin/restic\" in $PATH matches required version 0.18.0, it will be used for backrest commands"}
{"level":"info","ts":1743760860.1934817,"msg":"oplog applying data migration","migration_no":4}
{"level":"error","ts":1743760861.381978,"msg":"failed to apply data migration","migration_no":4,"error":"load operations for delete: sqlite: prepare: 1:65666: SQL logic error: too many SQL variables"}
{"level":"fatal","ts":1743760861.3821492,"msg":"error creating oplog: couldn't apply migration 4: load operations for delete: sqlite: prepare: 1:65666: SQL logic error: too many SQL variables"}
{"level":"info","ts":1743760929.727932,"msg":"backrest version 1.8.0@1775862ac2dfc6879a3b8acd32fae9d96c9c063c, using log directory: /data/processlogs"}
{"level":"info","ts":1743760929.7363298,"msg":"restic binary \"/bin/restic\" in $PATH matches required version 0.18.0, it will be used for backrest commands"}
{"level":"info","ts":1743760929.7675588,"msg":"oplog applying data migration","migration_no":4}
{"level":"error","ts":1743760930.9737484,"msg":"failed to apply data migration","migration_no":4,"error":"load operations for delete: sqlite: prepare: 1:65666: SQL logic error: too many SQL variables"}
{"level":"fatal","ts":1743760930.973921,"msg":"error creating oplog: couldn't apply migration 4: load operations for delete: sqlite: prepare: 1:65666: SQL logic error: too many SQL variables"}
{"level":"info","ts":1743761053.8205085,"msg":"backrest version 1.8.0@1775862ac2dfc6879a3b8acd32fae9d96c9c063c, using log directory: /data/processlogs"}
{"level":"info","ts":1743761053.8393211,"msg":"restic binary \"/bin/restic\" in $PATH matches required version 0.18.0, it will be used for backrest commands"}
{"level":"info","ts":1743761053.8665628,"msg":"oplog applying data migration","migration_no":4}
{"level":"error","ts":1743761055.3171668,"msg":"failed to apply data migration","migration_no":4,"error":"load operations for delete: sqlite: prepare: 1:65666: SQL logic error: too many SQL variables"}
{"level":"fatal","ts":1743761055.3173711,"msg":"error creating oplog: couldn't apply migration 4: load operations for delete: sqlite: prepare: 1:65666: SQL logic error: too many SQL variables"}

ps. Thank you for greate app :)

Sneer avatar Apr 04 '25 16:04 Sneer

Same error, I only noticed today that it was not running. Unraid 7.0,1. I was able to manually roll back to v1.7.3 for the moment.

BoxOfSnoo avatar Apr 08 '25 16:04 BoxOfSnoo

Put together a fix in https://github.com/garethgeorge/backrest/commit/d7c57a850671f1ecc8efa11418a6fddeaf3d9d28 , will aim to get out a bug patch release with a fix for this.

garethgeorge avatar Apr 09 '25 07:04 garethgeorge