Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bookstack-system-cli restore fails #5489

Open
wiknesta opened this issue Feb 14, 2025 · 2 comments
Open

bookstack-system-cli restore fails #5489

wiknesta opened this issue Feb 14, 2025 · 2 comments
Labels

Comments

@wiknesta
Copy link

Describe the Bug

Use the system cli to execute a restore. For example:
/app/www/bookstack-system-cli restore /backups/bookstack.zip

Now the process fails with the following message:
_Extracting ZIP into temporary directory...
Restoring and merging .env file...

An error occurred when attempting to run a command:

Could not find a working database configuration_

Steps to Reproduce

Use the system cli to execute a restore
For example: /app/www/bookstack-system-cli restore /backups/bookstack.zip

Expected Behaviour

The restore ends with the message: "Restore operation complete"

Screenshots or Additional Context

We use a Docker installation (lscr.io/linuxserver/bookstack). The restore is executed in the docker container of bookstack.
If bookstack is reset to version 24.05.3, the same restore works without any problems.

Browser Details

No response

Exact BookStack Version

v24.12.1

@ssddanbrown
Copy link
Member

Hi @wiknesta,
The CLI will throw that error if it can't find a working database connect from details it finds.

  • In this environment, where exactly would working database connection details be found?
  • Is the database running and connectable during this attempted restore?

@wiknesta
Copy link
Author

Hi @ssddanbrown
This problem may be related to issue #5373 (backup)

The database is running and connectable during this attempted restore.
Bookstack is installed with the folling docker-compose.yml:

version: "2"
services:
  bookstack:
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=http://192.168.1.136:6875
      - DB_HOST=bookstack_db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS=dummypassword
      - DB_DATABASE=bookstackapp
      - TZ=Europe/Zurich
      
    volumes:
      - /home/xabano/docker/bookstack_app_data:/config
      - /etc/localtime:/etc/localtime:ro 
    ports:
      - 6875:80
    restart: always
    depends_on:
      - bookstack_db
  bookstack_db:
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack_db
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=dummypassword
      - TZ=Europe/Zurich
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=dummypassword
    volumes:
      - /home/xabano/docker/bookstack_db_data:/config
      - /etc/localtime:/etc/localtime:ro 

    restart: unless-stopped

If an older docker-image is used for bookstack, there is no error. In this case, the restore is carried out correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants