"Unable to read uploaded file" when downloading the database and uploading it again

I’ve received this error - “Unable to read uploaded file” - after downloading the database, and then attempting to upload it again to the exact same instance. I’ve made no changes whatsoever to the file. I’ve tried uploading fresh databases and they work fine, and also uploading the nuisance database to different Kanboard installations (with varying versions) with the same error, so the database is definitely the problem. What’s weird is that the instance running the problem database is still fully functional. I looked in sqlitestudio and the database seems healthy, but I am guessing there is something malformed somewhere.

I am on version 1.2.21 at the moment, I am trying to migrate to the latest version. Here is what I can see from the log files when trying to upload the database to a version 1.2.21 instance (the same instance the database is on and currently running fine, no issues):

[2022-10-30 16:52:46] [debug] Kanboard\Core\Controller\Runner::executeMiddleware
[2022-10-30 16:52:46] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\AuthenticationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\PostAuthenticationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ApplicationAuthorizationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ProjectAuthorizationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\BoardAjaxController::check
[2022-10-30 15:52:46] [debug] SQL: SELECT "data" FROM "sessions"   WHERE "id" = ?    LIMIT 1
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.0014369487762451
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0014369487762451
[2022-10-30 15:52:46] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.00010895729064941
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0015459060668945
[2022-10-30 15:52:46] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.00011706352233887
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0016629695892334
[2022-10-30 15:52:46] [debug] SQL: SELECT * FROM "actions"   WHERE "project_id" IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=5.6982040405273E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0017199516296387
[2022-10-30 15:52:46] [debug] SQL: SELECT * FROM "action_has_params"   WHERE "action_id" IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=5.793571472168E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0017778873443604
[2022-10-30 15:52:46] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:52:46] [debug] SQL: query_duration=4.6968460083008E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0018248558044434
[2022-10-30 15:52:46] [debug] SQL: SELECT 1 FROM "subtasks"  WHERE "status" = ? AND "user_id" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.0001220703125
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0019469261169434
[2022-10-30 15:52:46] [debug] SQL: SELECT 1 FROM "users"  WHERE "id" = ? AND "is_active" = ? AND "role" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=5.1021575927734E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0019979476928711
[2022-10-30 15:52:46] [debug] SQL: SELECT COUNT(*) FROM "projects"  WHERE "id" = ? AND "last_modified" > ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.00010800361633301
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0021059513092041
[2022-10-30 15:52:46] [debug] SQL: SELECT 1 FROM "sessions"  WHERE "id" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=5.6982040405273E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0021629333496094
[2022-10-30 15:52:46] [debug] SQL: UPDATE "sessions" SET "expire_at"=?, "data"=?  WHERE "id" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.00012397766113281
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0022869110107422
[2022-10-30 15:52:46] [debug] APP: nb_queries=11
[2022-10-30 15:52:46] [debug] APP: rendering_time=0.026989936828613
[2022-10-30 15:52:46] [debug] APP: memory_usage=1.43M
[2022-10-30 15:52:46] [debug] APP: uri=/kanboard-1.2.21/?controller=BoardAjaxController&action=check&project_id=6&timestamp=1667144553&csrf_token=242a75dfab084ccae18b9c7f136f46d4a54e1838d6d8b9f26046589fb917&_=1667144553390
[2022-10-30 15:52:46] [debug] ###############################################
[2022-10-30 16:52:46] [debug] Kanboard\Core\Controller\Runner::executeMiddleware
[2022-10-30 16:52:46] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\AuthenticationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\PostAuthenticationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ApplicationAuthorizationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ProjectAuthorizationMiddleware
[2022-10-30 15:52:46] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\UserAjaxController::status
[2022-10-30 15:52:46] [debug] SQL: SELECT "data" FROM "sessions"   WHERE "id" = ?    LIMIT 1
[2022-10-30 15:52:46] [debug] SQL: query_duration=0.0016589164733887
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0016589164733887
[2022-10-30 15:52:46] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=6.2942504882812E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0017218589782715
[2022-10-30 15:52:46] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=7.0095062255859E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0017919540405273
[2022-10-30 15:52:46] [debug] SQL: SELECT * FROM "actions"   WHERE "project_id" IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=3.504753112793E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0018270015716553
[2022-10-30 15:52:46] [debug] SQL: SELECT * FROM "action_has_params"   WHERE "action_id" IN (?)
[2022-10-30 15:52:46] [debug] SQL: query_duration=3.3855438232422E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0018608570098877
[2022-10-30 15:52:46] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:52:46] [debug] SQL: query_duration=2.7894973754883E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0018887519836426
[2022-10-30 15:52:46] [debug] SQL: SELECT 1 FROM "subtasks"  WHERE "status" = ? AND "user_id" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=7.8916549682617E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0019676685333252
[2022-10-30 15:52:46] [debug] SQL: SELECT 1 FROM "users"  WHERE "id" = ? AND "is_active" = ? AND "role" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=3.6001205444336E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.0020036697387695
[2022-10-30 15:52:46] [debug] SQL: SELECT 1 FROM "sessions"  WHERE "id" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=2.6941299438477E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.002030611038208
[2022-10-30 15:52:46] [debug] SQL: UPDATE "sessions" SET "expire_at"=?, "data"=?  WHERE "id" = ?
[2022-10-30 15:52:46] [debug] SQL: query_duration=3.2901763916016E-5
[2022-10-30 15:52:46] [debug] SQL: total_execution_time=0.002063512802124
[2022-10-30 15:52:46] [debug] APP: nb_queries=10
[2022-10-30 15:52:46] [debug] APP: rendering_time=0.0068628787994385
[2022-10-30 15:52:46] [debug] APP: memory_usage=1.43M
[2022-10-30 15:52:46] [debug] APP: uri=/kanboard-1.2.21/?controller=UserAjaxController&action=status
[2022-10-30 15:52:46] [debug] ###############################################
[2022-10-30 16:52:49] [debug] Kanboard\Core\Controller\Runner::executeMiddleware
[2022-10-30 16:52:49] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2022-10-30 15:52:49] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\AuthenticationMiddleware
[2022-10-30 15:52:49] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\PostAuthenticationMiddleware
[2022-10-30 15:52:49] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ApplicationAuthorizationMiddleware
[2022-10-30 15:52:49] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ProjectAuthorizationMiddleware
[2022-10-30 15:52:49] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\ConfigController::index
[2022-10-30 15:52:49] [debug] SQL: SELECT "data" FROM "sessions"   WHERE "id" = ?    LIMIT 1
[2022-10-30 15:52:49] [debug] SQL: query_duration=0.0012381076812744
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0012381076812744
[2022-10-30 15:52:49] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:49] [debug] SQL: query_duration=0.00014209747314453
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0013802051544189
[2022-10-30 15:52:49] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:49] [debug] SQL: query_duration=0.00014591217041016
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0015261173248291
[2022-10-30 15:52:49] [debug] SQL: SELECT * FROM "actions"   WHERE "project_id" IN (?)
[2022-10-30 15:52:49] [debug] SQL: query_duration=7.4863433837891E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.001600980758667
[2022-10-30 15:52:49] [debug] SQL: SELECT * FROM "action_has_params"   WHERE "action_id" IN (?)
[2022-10-30 15:52:49] [debug] SQL: query_duration=6.2942504882812E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0016639232635498
[2022-10-30 15:52:49] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:52:49] [debug] SQL: query_duration=5.4121017456055E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0017180442810059
[2022-10-30 15:52:49] [debug] SQL: SELECT 1 FROM "subtasks"  WHERE "status" = ? AND "user_id" = ?
[2022-10-30 15:52:49] [debug] SQL: query_duration=0.00017905235290527
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0018970966339111
[2022-10-30 15:52:49] [debug] SQL: SELECT 1 FROM "users"  WHERE "id" = ? AND "is_active" = ? AND "role" = ?
[2022-10-30 15:52:49] [debug] SQL: query_duration=6.5803527832031E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0019629001617432
[2022-10-30 15:52:49] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:52:49] [debug] SQL: query_duration=3.2901763916016E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0019958019256592
[2022-10-30 15:52:49] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:49] [debug] SQL: query_duration=6.103515625E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0020568370819092
[2022-10-30 15:52:49] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:49] [debug] SQL: query_duration=8.5115432739258E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0021419525146484
[2022-10-30 15:52:49] [debug] SQL: SELECT 1 FROM "user_has_unread_notifications"  WHERE "user_id" = ?
[2022-10-30 15:52:49] [debug] SQL: query_duration=4.6014785766602E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.002187967300415
[2022-10-30 15:52:49] [debug] SQL: SELECT 1 FROM "sessions"  WHERE "id" = ?
[2022-10-30 15:52:49] [debug] SQL: query_duration=5.6982040405273E-5
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.0022449493408203
[2022-10-30 15:52:49] [debug] SQL: UPDATE "sessions" SET "expire_at"=?, "data"=?  WHERE "id" = ?
[2022-10-30 15:52:49] [debug] SQL: query_duration=0.0003209114074707
[2022-10-30 15:52:49] [debug] SQL: total_execution_time=0.002565860748291
[2022-10-30 15:52:49] [debug] APP: nb_queries=14
[2022-10-30 15:52:49] [debug] APP: rendering_time=0.026798009872437
[2022-10-30 15:52:49] [debug] APP: memory_usage=1.54M
[2022-10-30 15:52:49] [debug] APP: uri=/kanboard-1.2.21/?controller=ConfigController&action=index
[2022-10-30 15:52:49] [debug] ###############################################
[2022-10-30 16:52:54] [debug] Kanboard\Core\Controller\Runner::executeMiddleware
[2022-10-30 16:52:54] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2022-10-30 15:52:54] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\AuthenticationMiddleware
[2022-10-30 15:52:54] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\PostAuthenticationMiddleware
[2022-10-30 15:52:54] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ApplicationAuthorizationMiddleware
[2022-10-30 15:52:54] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ProjectAuthorizationMiddleware
[2022-10-30 15:52:54] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\ConfigController::uploadDb
[2022-10-30 15:52:54] [debug] SQL: SELECT "data" FROM "sessions"   WHERE "id" = ?    LIMIT 1
[2022-10-30 15:52:54] [debug] SQL: query_duration=0.00074291229248047
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.00074291229248047
[2022-10-30 15:52:54] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:54] [debug] SQL: query_duration=5.6028366088867E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.00079894065856934
[2022-10-30 15:52:54] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:52:54] [debug] SQL: query_duration=6.413459777832E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.00086307525634766
[2022-10-30 15:52:54] [debug] SQL: SELECT * FROM "actions"   WHERE "project_id" IN (?)
[2022-10-30 15:52:54] [debug] SQL: query_duration=3.1948089599609E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.00089502334594727
[2022-10-30 15:52:54] [debug] SQL: SELECT * FROM "action_has_params"   WHERE "action_id" IN (?)
[2022-10-30 15:52:54] [debug] SQL: query_duration=3.1948089599609E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.00092697143554688
[2022-10-30 15:52:54] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:52:54] [debug] SQL: query_duration=3.6001205444336E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.00096297264099121
[2022-10-30 15:52:54] [debug] SQL: SELECT 1 FROM "subtasks"  WHERE "status" = ? AND "user_id" = ?
[2022-10-30 15:52:54] [debug] SQL: query_duration=7.6055526733398E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.0010390281677246
[2022-10-30 15:52:54] [debug] SQL: SELECT 1 FROM "users"  WHERE "id" = ? AND "is_active" = ? AND "role" = ?
[2022-10-30 15:52:54] [debug] SQL: query_duration=3.2901763916016E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.0010719299316406
[2022-10-30 15:52:54] [debug] SQL: SELECT 1 FROM "sessions"  WHERE "id" = ?
[2022-10-30 15:52:54] [debug] SQL: query_duration=2.6941299438477E-5
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.0010988712310791
[2022-10-30 15:52:54] [debug] SQL: UPDATE "sessions" SET "expire_at"=?, "data"=?  WHERE "id" = ?
[2022-10-30 15:52:54] [debug] SQL: query_duration=0.00014114379882812
[2022-10-30 15:52:54] [debug] SQL: total_execution_time=0.0012400150299072
[2022-10-30 15:52:54] [debug] APP: nb_queries=10
[2022-10-30 15:52:54] [debug] APP: rendering_time=0.020253896713257
[2022-10-30 15:52:54] [debug] APP: memory_usage=1.5M
[2022-10-30 15:52:54] [debug] APP: uri=/kanboard-1.2.21/?controller=ConfigController&action=uploadDb
[2022-10-30 15:52:54] [debug] ###############################################
[2022-10-30 16:53:01] [debug] Kanboard\Core\Controller\Runner::executeMiddleware
[2022-10-30 16:53:01] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\AuthenticationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\PostAuthenticationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ApplicationAuthorizationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ProjectAuthorizationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\ConfigController::saveUploadedDb
[2022-10-30 15:53:01] [debug] SQL: SELECT "data" FROM "sessions"   WHERE "id" = ?    LIMIT 1
[2022-10-30 15:53:01] [debug] SQL: query_duration=0.00073909759521484
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.00073909759521484
[2022-10-30 15:53:01] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=6.4849853515625E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.00080394744873047
[2022-10-30 15:53:01] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=6.6995620727539E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.00087094306945801
[2022-10-30 15:53:01] [debug] SQL: SELECT * FROM "actions"   WHERE "project_id" IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.2901763916016E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.00090384483337402
[2022-10-30 15:53:01] [debug] SQL: SELECT * FROM "action_has_params"   WHERE "action_id" IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.2901763916016E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.00093674659729004
[2022-10-30 15:53:01] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:53:01] [debug] SQL: query_duration=2.7179718017578E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.00096392631530762
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "subtasks"  WHERE "status" = ? AND "user_id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=7.3909759521484E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0010378360748291
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "users"  WHERE "id" = ? AND "is_active" = ? AND "role" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.6001205444336E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0010738372802734
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "sessions"  WHERE "id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=4.0054321289062E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0011138916015625
[2022-10-30 15:53:01] [debug] SQL: UPDATE "sessions" SET "expire_at"=?, "data"=?  WHERE "id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=0.00021910667419434
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0013329982757568
[2022-10-30 15:53:01] [debug] APP: nb_queries=10
[2022-10-30 15:53:01] [debug] APP: rendering_time=0.13673901557922
[2022-10-30 15:53:01] [debug] APP: memory_usage=1.44M
[2022-10-30 15:53:01] [debug] APP: uri=/kanboard-1.2.21/?controller=ConfigController&action=saveUploadedDb&csrf_token=94d9f56c45c5ddf57b5f105772124e4de7c85d795fa9adc69e2e9916f3b3
[2022-10-30 15:53:01] [debug] ###############################################
[2022-10-30 16:53:01] [debug] Kanboard\Core\Controller\Runner::executeMiddleware
[2022-10-30 16:53:01] [debug] Subscriber executed: Kanboard\Subscriber\BootstrapSubscriber::execute
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\AuthenticationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\PostAuthenticationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ApplicationAuthorizationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\BaseMiddleware::next => Kanboard\Middleware\ProjectAuthorizationMiddleware
[2022-10-30 15:53:01] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\ConfigController::index
[2022-10-30 15:53:01] [debug] SQL: SELECT "data" FROM "sessions"   WHERE "id" = ?    LIMIT 1
[2022-10-30 15:53:01] [debug] SQL: query_duration=0.0010581016540527
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0010581016540527
[2022-10-30 15:53:01] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=8.4161758422852E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0011422634124756
[2022-10-30 15:53:01] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=9.1075897216797E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0012333393096924
[2022-10-30 15:53:01] [debug] SQL: SELECT * FROM "actions"   WHERE "project_id" IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=4.7206878662109E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0012805461883545
[2022-10-30 15:53:01] [debug] SQL: SELECT * FROM "action_has_params"   WHERE "action_id" IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=4.6014785766602E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0013265609741211
[2022-10-30 15:53:01] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.9815902709961E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0013663768768311
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "subtasks"  WHERE "status" = ? AND "user_id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=0.0001070499420166
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0014734268188477
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "users"  WHERE "id" = ? AND "is_active" = ? AND "role" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=5.0067901611328E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.001523494720459
[2022-10-30 15:53:01] [debug] SQL: SELECT "option", "value" FROM "settings"
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.6001205444336E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0015594959259033
[2022-10-30 15:53:01] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_users" ON "project_has_users"."project_id"="projects"."id"  WHERE project_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=6.7949295043945E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0016274452209473
[2022-10-30 15:53:01] [debug] SQL: SELECT projects.id, projects.name FROM "projects" LEFT JOIN "project_has_groups" ON "project_has_groups"."project_id"="projects"."id" LEFT JOIN "group_has_users" ON "group_has_users"."group_id"="project_has_groups"."group_id"  WHERE group_has_users.user_id = ? AND projects.is_active IN (?)
[2022-10-30 15:53:01] [debug] SQL: query_duration=6.1988830566406E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0016894340515137
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "user_has_unread_notifications"  WHERE "user_id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.6001205444336E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.001725435256958
[2022-10-30 15:53:01] [debug] SQL: SELECT 1 FROM "sessions"  WHERE "id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=3.2901763916016E-5
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.001758337020874
[2022-10-30 15:53:01] [debug] SQL: UPDATE "sessions" SET "expire_at"=?, "data"=?  WHERE "id" = ?
[2022-10-30 15:53:01] [debug] SQL: query_duration=0.00024604797363281
[2022-10-30 15:53:01] [debug] SQL: total_execution_time=0.0020043849945068
[2022-10-30 15:53:01] [debug] APP: nb_queries=14
[2022-10-30 15:53:01] [debug] APP: rendering_time=0.023026943206787
[2022-10-30 15:53:01] [debug] APP: memory_usage=1.54M
[2022-10-30 15:53:01] [debug] APP: uri=/kanboard-1.2.21/?controller=ConfigController&action=index
[2022-10-30 15:53:01] [debug] ###############################################

I had a look through the log file already but if I’m honest I have no idea what I’m looking for. Any help would be really appreciated as this is several years of data and my back ups are a few months old at this point.

Cheers

I dont know anything about SQLite but to solve your issue at hand in terms of backups… can you not just copy the sqlite file from the /data folder as it contains all your database contents - I think?

I actually just tried this, here is the error I get:

Internal Error: Unable to run SQL migrations: Running migration \Schema\version_126, SQLSTATE[HY000]: General error: 8 attempt to write a readonly database (You may have to fix it manually)

I will see what I can do from here and report back.

maybe check the database file permissions? and even the directory permissions?

Im sure you can disable the database migrations in the config file. that might be a fix also.

Changing the database permissions worked. Very strange as I would have expected them to be correct already and did not think of checking. Thanks a lot for your help, you saved my ass.

1 Like

no worries, glad the suggestion revealed further information. Out of curiosity, what should the permissions be for the database file?

I ask because in my latest plugin, Im looking at showing pass/fail icons for directories which are not writeable etc so would be good to know what the permission should be for the database file also

I just chmod 777 the whole thing… not the best practice but it’s running in a VM disconnected from the internet so I’m not worried. Sorry to be of no help : /

In case you need it