Error after attempting to restore. #3874

Closed
opened 2026-02-05 07:44:42 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @tyleroftrades on GitHub (Jun 22, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I'm new to this and learning. I set my bookstack and database to be volumes & had duplicati backing them up. I messed up the permissions of my docker folder and had to reinstall docker. After, I restored the bookstack database in the mariadb folder and restored the bookstack volume. When I start the bookstack stack I get an error.

In my attempts I tried to export this database after restoring it. When opening the database in notepad I see this:

Table structure for table activities

-- Error reading structure for table bookstack.activities: #1932 - Table 'bookstack.activities' doesn't exist in engine
-- Error reading data for table bookstack.activities: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM bookstack.activities' at line 1

For each and every table in the database.

Exact BookStack Version

v23.05.2

Log Content

PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1932 Table 'bookstack.migrations' doesn't exist in engine (SQL: select migration from migrations order by batch asc, migration asc)
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▕ }
+28 vendor frames
29 /app/www/artisan:35
Illuminate\Foundation\Console\Kernel::handle()

PHP Version

No response

Hosting Environment

Ubuntu Server on a proxmox vm.

Originally created by @tyleroftrades on GitHub (Jun 22, 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'm new to this and learning. I set my bookstack and database to be volumes & had duplicati backing them up. I messed up the permissions of my docker folder and had to reinstall docker. After, I restored the bookstack database in the mariadb folder and restored the bookstack volume. When I start the bookstack stack I get an error. In my attempts I tried to export this database after restoring it. When opening the database in notepad I see this: Table structure for table `activities` -- Error reading structure for table bookstack.activities: #1932 - Table 'bookstack.activities' doesn't exist in engine -- Error reading data for table bookstack.activities: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM `bookstack`.`activities`' at line 1 For each and every table in the database. ### Exact BookStack Version v23.05.2 ### Log Content PHP Warning: PHP Startup: Invalid date.timezone value '', using 'UTC' instead in Unknown on line 0 Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1932 Table 'bookstack.migrations' doesn't exist in engine (SQL: select `migration` from `migrations` order by `batch` asc, `migration` asc) 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▕ } +28 vendor frames 29 /app/www/artisan:35 Illuminate\Foundation\Console\Kernel::handle() ### PHP Version _No response_ ### Hosting Environment Ubuntu Server on a proxmox vm.
OVERLORD added the 🐕 Support label 2026-02-05 07:44:42 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jun 22, 2023):

After, I restored the bookstack database in the mariadb folder

What exactly are you doing at this point?
Restoring raw database files can be quite finicky, you often can't just restore one database's files, ideally you'd want all files. You'd also ideally want to be restoring to the exact same database system version and architecture.
Do you have a clean backup of all previous database files? (Not just BookStack database files).

@ssddanbrown commented on GitHub (Jun 22, 2023): > After, I restored the bookstack database in the mariadb folder What exactly are you doing at this point? Restoring raw database files can be quite finicky, you often can't just restore one database's files, ideally you'd want all files. You'd also ideally want to be restoring to the exact same database system version and architecture. Do you have a clean backup of all previous database files? (Not just BookStack database files).
Author
Owner

@tyleroftrades commented on GitHub (Jun 23, 2023):

The first thing I did was just a basic restore of all the files and then I spent days copying file by file and scrounging old issues. I'm almost certain that the database version has not change in the time of me restoring this, but specifying the version & doing a complete restore of the databases file and bookstacks folder for some reason makes it work. Thank you for your help & the project it makes studying a lot easier for me.

The more I do this as a hobby the more insane I get. It feels like the computer is out to get me half the time.

@tyleroftrades commented on GitHub (Jun 23, 2023): The first thing I did was just a basic restore of all the files and then I spent days copying file by file and scrounging old issues. I'm almost certain that the database version has not change in the time of me restoring this, but specifying the version & doing a complete restore of the databases file and bookstacks folder for some reason makes it work. Thank you for your help & the project it makes studying a lot easier for me. The more I do this as a hobby the more insane I get. It feels like the computer is out to get me half the time.
Author
Owner

@ssddanbrown commented on GitHub (Jun 23, 2023):

Happy to hear that helped and you got things working again!

The more I do this as a hobby the more insane I get.

That is the way. Code/devops/selfhosting is a never-ending pit of learning, discovery and self-foot shooting. The more your learn the more your find that you do not yet understand.

@ssddanbrown commented on GitHub (Jun 23, 2023): Happy to hear that helped and you got things working again! > The more I do this as a hobby the more insane I get. That is the way. Code/devops/selfhosting is a never-ending pit of learning, discovery and self-foot shooting. The more your learn the more your find that you do not yet understand.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3874