I took mariadb backup of my mariadb server using below command:
mariabackup --backup --target-dir=/root/mariabackup --databases='MYDATABASE' -- tables='Table7' --user=root
ls /root/mariabackup
MYDATABASE backup-my.cnf ibdata1
aria_log.00000001 ib_buffer_pool xtrabackup_checkpoints
aria_log_control ib_logfile0 xtrabackup_info
I run my container and mount above directory with /var/lib/mysql using below command:
docker run --name=BackupCont -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=Y -p 3309:3309 --mount type=bind,src=/root/mariabackup,dst=/var/lib/mysql -d mariadb
I run docker logs BackupCont and it shows below:
2022-05-30 07:59:18+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.8.3+maria~jammy started.
2022-05-30 07:59:18+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-05-30 07:59:18+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.8.3+maria~jammy started.
2022-05-30 07:59:18+00:00 [Note] [Entrypoint]: Initializing database files
2022-05-30 7:59:18 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOMEM: try larger memory locked limit, ulimit -l, or https://mariadb.com/kb/en/systemd/#configuring-limitmemlock under systemd (262144 bytes required)
2022-05-30 7:59:18 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
2022-05-30 7:59:18 0 [ERROR] InnoDB: File ./ib_logfile0 is too small
2022-05-30 7:59:18 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2022-05-30 7:59:18 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-05-30 7:59:18 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-05-30 7:59:18 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-05-30 7:59:18 0 [ERROR] Aborting
Installation of system tables failed! Examine the logs in
/var/lib/mysql/ for more information.
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
shell> /usr/bin/mariadb-install-db --defaults-file=~/.my.cnf
You can also try to start the mysqld daemon with:
shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &
and use the command line tool /usr/bin/mariadb
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables;
Try 'mysqld --help' if you have problems with paths. Using
--general-log gives you a log in /var/lib/mysql/ that may be helpful.
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
Please check all of the above before submitting a bug report
at https://mariadb.org/jira
You can see after running the container when I run docker logs BackupCont, this is the error I am getting while mounting. The backup directory have backup of mariadb version 10.3.34