반응형
도커 컨테이너에 mariadb 백업 마운트 중
다음 명령을 사용하여 mariadb 서버의 mariadb 백업을 수행했습니다.
mariabackup --backup --target-dir=/root/mariabackup --databases='MYDATABASE' -- tables='Table7' --user=root
ls /root/백업 실행
MYDATABASE backup-my.cnf ibdata1
aria_log.00000001 ib_buffer_pool xtrabackup_checkpoints
aria_log_control ib_logfile0 xtrabackup_info
아래 명령을 사용하여 /var/lib/mysql로 컨테이너를 실행하고 디렉토리 위에 마운트합니다.
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
도커 로그 BackupCont를 실행하면 다음과 같습니다.
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
컨테이너를 실행한 후 도커 로그 BackupCont를 실행하면 이 오류가 마운트 중에 발생하는 것을 확인할 수 있습니다.백업 디렉토리에 mariadb 버전 10.3.34의 백업이 있습니다.
언급URL : https://stackoverflow.com/questions/72431075/mounting-mariadb-backup-to-docker-container
반응형
'programing' 카테고리의 다른 글
Oracle 12에 SQL의 로컬 수집 유형에 문제가 있습니까? (0) | 2023.08.01 |
---|---|
jQuery를 사용하여 .prop을 변경해도 .change 이벤트가 트리거되지 않습니다. (0) | 2023.08.01 |
치명적 오류:발견되지 않은 오류: 스칼라를 어레이 경고로 사용할 수 없습니다. (0) | 2023.08.01 |
IIS 관리자로 이동하려면 어떻게 해야 합니까? (0) | 2023.08.01 |
swift : 차단 선언과 같은 폐쇄 선언 (0) | 2023.08.01 |