docker-db-backup icon indicating copy to clipboard operation
docker-db-backup copied to clipboard

Cannot restore "all" database

Open radokristof opened this issue 1 year ago • 1 comments

Summary

During restore the all parameter is not accepted.

Steps to reproduce

Create a config where the DB_NAME is set to "all" and after a backup try to restore. Select "Enviroment variable option"

What is the expected correct behavior?

It should discover and try to restore all databases in the backup.

Relevant logs and/or screenshots

What Database Type are you looking to restore?

    E ) Environment Variable DB_TYPE: 'mysql'
    F ) Parsed Filename Type: 'mysql'

    M ) MySQL / MariaDB
    O ) MongoDB
    P ) Postgresql
    Q ) Quit

** Enter Value (E) | (F) | (M) | (P) :  e

What Hostname do you wish to restore to:

    C ) Custom Entered Hostname
    E ) Environment Variable DB_HOST: 'db'
    F ) Parsed Filename Host: 'db'
    Q ) Quit

** Enter Value (C) | (E) | (F) :  e

What Database Name do you want to restore to?

    C ) Custom Entered Database Name
    E ) Environment Variable DB_NAME: 'ALL'
    F ) Parsed Filename DB Name: 'all'
    Q ) Quit

** Enter Value (C) | (E) | (F) :  e

What database user will be used for restore:

    C ) Custom Entered Database User
    E ) Environment Variable DB_USER: 'root'
    Q ) Quit

** Enter Value (C) | (E) :  e

What Database Password will be used to restore?

    C ) Custom Entered Database Password
    E ) Environment Variable DB_PASS
    Q ) Quit

** Enter Value (C) | (E) :  e

What Database Port do you wish to use? MySQL/MariaDB typcially listens on port 3306. Postrgresql port 5432. MongoDB 27017

    C ) Custom Entered Database Port
    E ) Environment Variable DB_PORT: '3306'
    Q ) Quit

** Enter Value (C) | (E) :  e
2023-06-07.14:25:38 [INFO] ** [db-backup-restore] Restoring '/backup/mysql_all_db_20230607-031500.sql.zst' into 'db'/'ALL'
ERROR 1049 (42000): Unknown database 'all'
 960KiB 0:00:00 [98.4MiB/s] [===========================>                                                                                                                                           ] 17%            
2023-06-07.14:25:38 [ERROR] ** [db-backup-restore] Restore reported errors

Environment

  • Image version / tag: current latest, 39.3
  • Host OS: Tested on Ubuntu and Docker Desktop (WSL)
  • Database type: Tested on MySQL (mariadb) and Postgres.

radokristof avatar Jun 07 '23 14:06 radokristof