0

I'm testing the workflow to start a mySQL Docker Container with an existing InnoDB directory. This was pretty much rsync'ed from a remote server.

I tried MariaDB with the following result:

db_mariaDB | 2020-12-15 13:01:35 0 [ERROR] InnoDB: redo log file './ib_logfile0' exists. Creating system tablespace with existing redo log file is not recommended. Please delete redo log file before creating new system tablespace.
db_mariaDB | 2020-12-15 13:01:35 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
db_mariaDB | 2020-12-15 13:01:35 0 [ERROR] Plugin 'InnoDB' init function returned error.
db_mariaDB | 2020-12-15 13:01:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db_mariaDB | 2020-12-15 13:01:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB
db_mariaDB | 2020-12-15 13:01:35 0 [ERROR] Aborting

...and mySQL with the following result:

db_mysql   | 2020-12-15 13:08:51+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_mysql   | 2020-12-15 13:08:51+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
db_mysql   | 2020-12-15 13:08:52+00:00 [Note] [Entrypoint]: Initializing database files
db_mysql   | 2020-12-15T13:08:52.068011Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.22) initializing of server in progress as process 43
db_mysql   | 2020-12-15T13:08:52.070879Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
db_mysql   | 2020-12-15T13:08:52.070887Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
db_mysql   | 2020-12-15T13:08:52.071764Z 0 [ERROR] [MY-010119] [Server] Aborting

The point is that I can't make a database dump and then put it into the directory and let the container make some init magic, since the database where this tool is intended to work with is closing in on 0.5TB. It'll take centuries to initialize the container.

Any hints on how to make this work?

2
  • rsync the directory on the remote side only works if the remote mysql/mariadb server is stopped. What MySQL/MariaDB version is the remote? Recommend using the same on the local side. Look at using xtrabackup/mariabackup and if needed, replicate from the remote server to get an up to date copy.
    – danblack
    Commented Dec 17, 2020 at 0:56
  • That the database was still running might very well be the reason. Unfortunately it can't be just stoppen since its in production. However, I'll try your backup suggestions. The major and minor versions are matched. Thanks!
    – Codebaard
    Commented Dec 17, 2020 at 9:00

0

You must log in to answer this question.

Browse other questions tagged .