"HTTP ERROR 500" error message after upgrading Bookstack and login #4290

Closed
opened 2026-02-05 08:26:53 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @bobinator83 on GitHub (Nov 1, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I have updated my Bookstack App from version 22.03.1 to the latest one. Should be v23.10, but I'm not 100% sure, because of I can not login anymore. After the update I get the login page, but when I'm login with my credentials, I get the error message "HTTP ERROR 500"

I have some experience with accessing or interacting with databases and hope it is enought to fix this issue together with you ;-)

Exact BookStack Version

latest, should be v23.10.

Log Content

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1026
User GID: 100
───────────────────────────────────────
using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
Waiting for DB to be available
PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
INFO Running migrations.
2021_12_07_111343_create_webhooks_table ........................... 3ms FAIL
Illuminate\Database\QueryException
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'webhooks' already exists (SQL: create table webhooks (id int unsigned not null auto_increment primary key, name varchar(150) not null, active tinyint(1) not null, endpoint varchar(500) not null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
756▕ // If an exception occurs when attempting to run a query, we'll format the error
757▕ // message to include the bindings with SQL, which will make this exception a
758▕ // lot more helpful to the developer instead of just the database's errors.
759▕ catch (Exception $e) {
➜ 760▕ throw new QueryException(
761▕ $query, $this->prepareBindings($bindings), $e
762▕ );
763▕ }
764▕ }
+9 vendor frames
10 /app/www/database/migrations/2021_12_07_111343_create_webhooks_table.php:16
Illuminate\Support\Facades\Facade::__callStatic()
+25 vendor frames
36 /app/www/artisan:35
Illuminate\Foundation\Console\Kernel::handle()
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/._DAV/default.conf.pag
/config/nginx/site-confs/._DAV/default.conf.dir
/config/nginx/site-confs/default
[custom-init] No custom files found, skipping...
[31-Oct-2023 21:26:26] NOTICE: PHP message: PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
[ls.io-init] done.

-- Content from /config/log/nginx/error.log
2023/10/31 21:29:28 [error] 272#272: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'view' in 'where clause' in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414
Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): PDO->prepare()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database{closure}()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\Database\Connection->run()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\Database\Connection->select()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\Database\Query\Builder->runSelect()
#6 /app/www/vendor/laravel/fr...; PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'view' in 'where clause' in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414
Stack trace:
#0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): PDO->prepare()
#1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database{closure}()
#2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback()
#3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\Database\Connection->run()
#4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\Database\Connection->select()
#5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\Database\Query\Bu

Hosting Environment

running docker on a Synology and manage a bookstack stack with portainer:


version: "2"
services:
bookstack:
image: lscr.io/linuxserver/bookstack
container_name: bookstack_test
environment:
- PUID=1026
- PGID=100
- APP_URL=https://kb.domain.de
- APP_KEY=base64:SPlSs5IxxxxxxxxxxxxxxxxxxxxxxxxxxhhM+hikB/M0=
- DB_HOST=bookstack_db
- DB_PORT=3306
- DB_USER=bookstack
- DB_PASS=password
- DB_DATABASE=bookstackapp
volumes:
- /volume1/docker/bookstack_test/app:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
bookstack_db:
image: lscr.io/linuxserver/mariadb
container_name: bookstack_db_test
environment:
- PUID=1026
- PGID=100
- MYSQL_ROOT_PASSWORD=password
- TZ=Europe/Berlin
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=password
volumes:
- /volume1/docker/bookstack_test/db:/config
restart: unless-stopped

Originally created by @bobinator83 on GitHub (Nov 1, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I have updated my Bookstack App from version 22.03.1 to the latest one. Should be v23.10, but I'm not 100% sure, because of I can not login anymore. After the update I get the login page, but when I'm login with my credentials, I get the error message "HTTP ERROR 500" I have some experience with accessing or interacting with databases and hope it is enought to fix this issue together with you ;-) ### Exact BookStack Version latest, should be v23.10. ### Log Content [migrations] started [migrations] 01-nginx-site-confs-default: skipped [migrations] 02-default-location: skipped [migrations] done usermod: no changes ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1026 User GID: 100 ─────────────────────────────────────── using keys found in /config/keys App Key found - setting variable for seds Running config - DB_HOST set Waiting for DB to be available PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0 INFO Running migrations. 2021_12_07_111343_create_webhooks_table ........................... 3ms FAIL Illuminate\Database\QueryException SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'webhooks' already exists (SQL: create table `webhooks` (`id` int unsigned not null auto_increment primary key, `name` varchar(150) not null, `active` tinyint(1) not null, `endpoint` varchar(500) not null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 756▕ // If an exception occurs when attempting to run a query, we'll format the error 757▕ // message to include the bindings with SQL, which will make this exception a 758▕ // lot more helpful to the developer instead of just the database's errors. 759▕ catch (Exception $e) { ➜ 760▕ throw new QueryException( 761▕ $query, $this->prepareBindings($bindings), $e 762▕ ); 763▕ } 764▕ } +9 vendor frames 10 /app/www/database/migrations/2021_12_07_111343_create_webhooks_table.php:16 Illuminate\Support\Facades\Facade::__callStatic() +25 vendor frames 36 /app/www/artisan:35 Illuminate\Foundation\Console\Kernel::handle() **** The following site-confs have extensions other than .conf **** **** This may be due to user customization. **** **** You should review the files and rename them to use the .conf extension or remove them. **** **** nginx.conf will only include site-confs with the .conf extension. **** /config/nginx/site-confs/._DAV/default.conf.pag /config/nginx/site-confs/._DAV/default.conf.dir /config/nginx/site-confs/default [custom-init] No custom files found, skipping... [31-Oct-2023 21:26:26] NOTICE: PHP message: PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0 [ls.io-init] done. -- Content from /config/log/nginx/error.log 2023/10/31 21:29:28 [error] 272#272: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'view' in 'where clause' in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414 Stack trace: #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): PDO->prepare() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\Database\Connection->run() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\Database\Connection->select() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\Database\Query\Builder->runSelect() #6 /app/www/vendor/laravel/fr...; PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'view' in 'where clause' in /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414 Stack trace: #0 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(414): PDO->prepare() #1 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\Database\Connection->Illuminate\Database\{closure}() #2 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\Database\Connection->runQueryCallback() #3 /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\Database\Connection->run() #4 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2705): Illuminate\Database\Connection->select() #5 /app/www/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2694): Illuminate\Database\Query\Bu ### Hosting Environment running docker on a Synology and manage a bookstack stack with portainer: --- version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack_test environment: - PUID=1026 - PGID=100 - APP_URL=https://kb.domain.de - APP_KEY=base64:SPlSs5IxxxxxxxxxxxxxxxxxxxxxxxxxxhhM+hikB/M0= - DB_HOST=bookstack_db - DB_PORT=3306 - DB_USER=bookstack - DB_PASS=password - DB_DATABASE=bookstackapp volumes: - /volume1/docker/bookstack_test/app:/config ports: - 6875:80 restart: unless-stopped depends_on: - bookstack_db bookstack_db: image: lscr.io/linuxserver/mariadb container_name: bookstack_db_test environment: - PUID=1026 - PGID=100 - MYSQL_ROOT_PASSWORD=password - TZ=Europe/Berlin - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=password volumes: - /volume1/docker/bookstack_test/db:/config restart: unless-stopped
OVERLORD added the 🐕 Support label 2026-02-05 08:26:53 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 1, 2023):

I have some experience with accessing or interacting with databases and hope it is enought to fix this issue together with you ;-)

Awesome! To create a plan of action, it'll be good to know the following:

  • Can you confirm the last 5 or so lines from the migrations table of the database?
    • select * from migrations order by migration desc limit 5;
  • Out of the follow list of table names, which of these tables exists in your database?:
    • webhooks, webhook_tracked_events, jobs.
  • Ensure you have a backup of your instance (especially a database dump/backup ideally).
    • I show creating a DB dump for this container in my video here but not sure how well it translates to a portainer/synology setup.

If you're unsure how to access the database container to query these details, just let me know.

Unfortunately we won't know the underlying cause right away before attempting to fix, this would have been an issue from when you originally upgrading to a v22.* release (or initial install) but has just gone unnoticed until now.

BTW, I'm about to go offline as it's getting late here, so it'll probably be a good few hours before I can respond again, so no rush to get these details right now.

@ssddanbrown commented on GitHub (Nov 1, 2023): > I have some experience with accessing or interacting with databases and hope it is enought to fix this issue together with you ;-) Awesome! To create a plan of action, it'll be good to know the following: - Can you confirm the last 5 or so lines from the `migrations` table of the database? - `select * from migrations order by migration desc limit 5;` - Out of the follow list of table names, which of these tables exists in your database?: - `webhooks`, `webhook_tracked_events`, `jobs`. - Ensure you have a backup of your instance (especially a database dump/backup ideally). - I show creating a DB dump for this container in [my video here](https://youtu.be/6A8hLuQTkKQ?t=576) but not sure how well it translates to a portainer/synology setup. If you're unsure how to access the database container to query these details, just let me know. Unfortunately we won't know the underlying cause right away before attempting to fix, this would have been an issue from when you originally upgrading to a `v22.*` release (or initial install) but has just gone unnoticed until now. BTW, I'm about to go offline as it's getting late here, so it'll probably be a good few hours before I can respond again, so no rush to get these details right now.
Author
Owner

@bobinator83 commented on GitHub (Nov 2, 2023):

Hi Dan,

Many many thanks for our support!
Here are the last 5 entries of the migrations table

MariaDB [bookstackapp]> select * from migrations order by migration desc limit 5;
+----+---------------------------------------------------+-------+
| id | migration                                         | batch |
+----+---------------------------------------------------+-------+
| 59 | 2021_11_26_070438_add_index_for_user_ip           |     3 |
| 58 | 2021_09_26_044614_add_activities_ip_column        |     2 |
| 57 | 2021_08_28_161743_add_export_role_permission      |     2 |
| 56 | 2021_07_03_085038_add_mfa_enforced_to_roles_table |     2 |
| 55 | 2021_06_30_173111_create_mfa_values_table         |     2 |
+----+---------------------------------------------------+-------+

Next, all three tables "webhooks, webhook_tracked_events, jobs" exists.

I already have created a sqldump. With this dump I was able to create a working (test) docker container with the following specs.

bookstack:
image: linuxserver/bookstack:22.03.1
bookstack_db:
image: lscr.io/linuxserver/mariadb

Afterwards I have updated the bookstack app with the image "image: lscr.io/linuxserver/bookstack" to the latest version and get the same error message.
So it would be really nice if we get my test environment working, so that I have a plan how to migrate my bookstack to the latest version. Then I should be able to migrate my production.
I hope you now what my plan is and that it is possible. Important is, we can try it on my test environment and will not damage my production.

@bobinator83 commented on GitHub (Nov 2, 2023): Hi Dan, Many many thanks for our support! Here are the last 5 entries of the migrations table ``` MariaDB [bookstackapp]> select * from migrations order by migration desc limit 5; +----+---------------------------------------------------+-------+ | id | migration | batch | +----+---------------------------------------------------+-------+ | 59 | 2021_11_26_070438_add_index_for_user_ip | 3 | | 58 | 2021_09_26_044614_add_activities_ip_column | 2 | | 57 | 2021_08_28_161743_add_export_role_permission | 2 | | 56 | 2021_07_03_085038_add_mfa_enforced_to_roles_table | 2 | | 55 | 2021_06_30_173111_create_mfa_values_table | 2 | +----+---------------------------------------------------+-------+ ``` Next, all three tables "webhooks, webhook_tracked_events, jobs" exists. I already have created a sqldump. With this dump I was able to create a working (test) docker container with the following specs. bookstack: image: linuxserver/bookstack:22.03.1 bookstack_db: image: lscr.io/linuxserver/mariadb Afterwards I have updated the bookstack app with the image "image: lscr.io/linuxserver/bookstack" to the latest version and get the same error message. So it would be really nice if we get my test environment working, so that I have a plan how to migrate my bookstack to the latest version. Then I should be able to migrate my production. I hope you now what my plan is and that it is possible. Important is, we can try it on my test environment and will not damage my production.
Author
Owner

@ssddanbrown commented on GitHub (Nov 2, 2023):

Thanks for the info.
Strange though, I would not expect the jobs table to exist, unless you've at some point imported a database dump over the database for a later version.

What about a references table, does that exist?
And are the results provided above from your test instance (Made from the dump) or the original instance? Just want to make sure I'm not following issues that are only present in the test instance due to import process or something.

@ssddanbrown commented on GitHub (Nov 2, 2023): Thanks for the info. Strange though, I would not expect the `jobs` table to exist, unless you've at some point imported a database dump over the database for a later version. What about a `references` table, does that exist? And are the results provided above from your test instance (Made from the dump) or the original instance? Just want to make sure I'm not following issues that are only present in the test instance due to import process or something.
Author
Owner

@bobinator83 commented on GitHub (Nov 5, 2023):

Hi Dan,

sorry for the delay.

The references table exists and the results comes from the test instance. But I think I need to tell you a few more details what I did.

First instance (prod instance)
My first boockstack instance was created round about 2 years ago. I have used Portainer to create a docker container for only the bookstack app (linuxserver/bookstack:21.10.3)
I have configured the container so that it uses a mariadb database from synology (seperate database for bookstack). Now I know that it is better to have a seperate instance for the database and the best way is to have one container for the app and one for the database.
Some month ago I decided to update my bookstack app to the latest version (sorry, I can't remember the exact version). I shutdown the container, pulled the latest version of bookstack and started the bookstack container. Then I got an HTTP error and my bookstack was no longer reachable.
So I had become afraid, shutdown the container again, pulled the old image linuxserver/bookstack:21.10.3 and started the container. There was still an web server issue but I got it fix with support of my friend. I only need to restore the nginx.conf.
Thats the current status of my prod instance. I have checked the tables in the prod instance and the tables webhooks, webhook_tracked_events, jobs and references are not there.

Second instance (test instance)
Because I'm afraid of breaking my prod instance again, I decided to take a dump from my prod instance and I have created a new stack with portainer. But now I have created a container for bookstack app (linuxserver/bookstack:21.10.3) and one for the database (lscr.io/linuxserver/mariadb)
Afterwards I was able to import the dump from the prod instance to the test instance and I had a working bookstack app. Then I tried to update the bookstack app but it was only possible to version (linuxserver/bookstack:22.03.1) All versions above failed with different errors.
So I decided to update to the latest version again and asked you for support to fix the issue.
In the test instance the tables webhooks, webhook_tracked_events, jobs and references are there.
Thats the current status of my test instance.

Sorry for the confusion. But my only plan is to update my (working) prod instance to the latest version and migrate the database in a own docker container and I would like to test it first. I hope that is still possible and I haven't ruined it for myself

@bobinator83 commented on GitHub (Nov 5, 2023): Hi Dan, sorry for the delay. The references table exists and the results comes from the test instance. But I think I need to tell you a few more details what I did. First instance (prod instance) My first boockstack instance was created round about 2 years ago. I have used Portainer to create a docker container for only the bookstack app (linuxserver/bookstack:21.10.3) I have configured the container so that it uses a mariadb database from synology (seperate database for bookstack). Now I know that it is better to have a seperate instance for the database and the best way is to have one container for the app and one for the database. Some month ago I decided to update my bookstack app to the latest version (sorry, I can't remember the exact version). I shutdown the container, pulled the latest version of bookstack and started the bookstack container. Then I got an HTTP error and my bookstack was no longer reachable. So I had become afraid, shutdown the container again, pulled the old image linuxserver/bookstack:21.10.3 and started the container. There was still an web server issue but I got it fix with support of my friend. I only need to restore the nginx.conf. Thats the current status of my prod instance. I have checked the tables in the prod instance and the tables webhooks, webhook_tracked_events, jobs and references are not there. Second instance (test instance) Because I'm afraid of breaking my prod instance again, I decided to take a dump from my prod instance and I have created a new stack with portainer. But now I have created a container for bookstack app (linuxserver/bookstack:21.10.3) and one for the database (lscr.io/linuxserver/mariadb) Afterwards I was able to import the dump from the prod instance to the test instance and I had a working bookstack app. Then I tried to update the bookstack app but it was only possible to version (linuxserver/bookstack:22.03.1) All versions above failed with different errors. So I decided to update to the latest version again and asked you for support to fix the issue. In the test instance the tables webhooks, webhook_tracked_events, jobs and references are there. Thats the current status of my test instance. Sorry for the confusion. But my only plan is to update my (working) prod instance to the latest version and migrate the database in a own docker container and I would like to test it first. I hope that is still possible and I haven't ruined it for myself
Author
Owner

@ssddanbrown commented on GitHub (Nov 5, 2023):

Okay, the issues you're originally reporting here are likely due to the specific import process for the test instance.
You imported a database dump for an older version, over a database scheme created for a later version of BookStack.
Therefore BookStack is getting configured when attempting to upgrade the database, but finding that changes it's trying to do have already been made.
Ideally imports of database dumps should be done into an empty database instance. In a docker setup you'd usually achieve this by only starting the database container within the stack, import the database dump, then bring all containers up.

Are you in a position where you can re-import for the test instance (from an empty database instance) or do you now have data in there which you need to retain?

@ssddanbrown commented on GitHub (Nov 5, 2023): Okay, the issues you're originally reporting here are likely due to the specific import process for the test instance. You imported a database dump for an older version, over a database scheme created for a later version of BookStack. Therefore BookStack is getting configured when attempting to upgrade the database, but finding that changes it's trying to do have already been made. Ideally imports of database dumps should be done into an empty database instance. In a docker setup you'd usually achieve this by only starting the database container within the stack, import the database dump, then bring all containers up. Are you in a position where you can re-import for the test instance (from an empty database instance) or do you now have data in there which you need to retain?
Author
Owner

@bobinator83 commented on GitHub (Nov 5, 2023):

Yes, we can use the test instance for a re-import of a dump. Do you need some more information?
Is there a speacial way to export and import the dump?

@bobinator83 commented on GitHub (Nov 5, 2023): Yes, we can use the test instance for a re-import of a dump. Do you need some more information? Is there a speacial way to export and import the dump?
Author
Owner

@ssddanbrown commented on GitHub (Nov 9, 2023):

Is there a speacial way to export and import the dump?

Not really, just make sure you import into an empty database environment, before the BookStack container has run against it, then you should be fine. Watch and record any errors upon first BookStack container boot as any errors may be different and less clear on a second attempt.

@ssddanbrown commented on GitHub (Nov 9, 2023): > Is there a speacial way to export and import the dump? Not really, just make sure you import into an empty database environment, before the BookStack container has run against it, then you should be fine. Watch and record any errors upon first BookStack container boot as any errors may be different and less clear on a second attempt.
Author
Owner

@bobinator83 commented on GitHub (Nov 9, 2023):

Ok then I will try this. Is it important which version of bookstack and MariaDB I have installed? Could I use direct the latest version?

@bobinator83 commented on GitHub (Nov 9, 2023): Ok then I will try this. Is it important which version of bookstack and MariaDB I have installed? Could I use direct the latest version?
Author
Owner

@ssddanbrown commented on GitHub (Nov 10, 2023):

Yeah, for BookStack you can use the latest version. When you run the BookStack container it'll attempt to update the BookStack database schema on startup, which is what's going wrong at the moment. I try to make sure that with BookStack you can jump forward to any future versions, just don't go backwards.
Just make sure you restore the backup into the empty database, before the bookstack container is started.

@ssddanbrown commented on GitHub (Nov 10, 2023): Yeah, for BookStack you can use the latest version. When you run the BookStack container it'll attempt to update the BookStack database schema on startup, which is what's going wrong at the moment. I try to make sure that with BookStack you can jump forward to any future versions, just don't go backwards. Just make sure you restore the backup into the empty database, before the bookstack container is started.
Author
Owner

@bobinator83 commented on GitHub (Nov 10, 2023):

Hi Dan,

you make my day! I have successfully imported the dump into a new BookStack instance and it works fine.

Here my steps:

  • Export my productive BookStack database with mysqldump
  • Create a new BookStack stack with Portainer (app+db)
  • Stop my BookStack App
  • Drop my new BookStack database
  • Create a new BookStack database
  • Import the mysqldump file
  • Start the BookStack App
  • Thats it

Many many thanks Dan. From now on I will. Frequently update and only forwards.

@bobinator83 commented on GitHub (Nov 10, 2023): Hi Dan, you make my day! I have successfully imported the dump into a new BookStack instance and it works fine. Here my steps: - Export my productive BookStack database with mysqldump - Create a new BookStack stack with Portainer (app+db) - Stop my BookStack App - Drop my new BookStack database - Create a new BookStack database - Import the mysqldump file - Start the BookStack App - Thats it Many many thanks Dan. From now on I will. Frequently update and only forwards.
Author
Owner

@ssddanbrown commented on GitHub (Nov 10, 2023):

@bobinator83 Happy to help, good to hear you got things sorted!

@ssddanbrown commented on GitHub (Nov 10, 2023): @bobinator83 Happy to help, good to hear you got things sorted!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4290