Open FunkyGod opened 8 months ago
在主机A使用docker-compose.yaml部署了服务,然后想要在主机B部署一样的服务,按时迁移主机A里的数据,包含Mtab和mysql文件夹下的全部数据,然后再主机B恢复,会报错
mtab-sql | 2024-03-04T08:59:21.128670Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead. mtab-sql | 2024-03-04T08:59:21.133812Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.36) starting as process 1 mtab-sql | 2024-03-04T08:59:21.195361Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. mtab-sql | 2024-03-04T08:59:21.226261Z 1 [ERROR] [MY-012209] [InnoDB] Multiple files found for the same tablespace ID: mtab-sql | 2024-03-04T08:59:21.226385Z 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 1 = ['mysql/sys/sys_config.ibd', 'sys/sys_config.ibd'] mtab-sql | 2024-03-04T08:59:21.226416Z 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 4294967279 = ['mysql/undo_001', 'undo_001'] mtab-sql | 2024-03-04T08:59:21.226459Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Failed, retry may succeed. mtab-sql | 2024-03-04T08:59:21.226530Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine mtab-sql | 2024-03-04T08:59:21.229274Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. mtab-sql | 2024-03-04T08:59:21.229346Z 0 [ERROR] [MY-010119] [Server] Aborting mtab-sql | 2024-03-04T08:59:21.230254Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.36) MySQL Community Server - GPL.
mtab在迁移的时候是没有问题的。但是Mysql的话需要重新部署后将原数据库导出的SQL文件导入。
作者有没有考虑支持多数据库,支持一下sqlite,感觉书签的话可能用轻量级的数据库就够用了。docker-composer这段` volumes:
我感觉改成这样
在主机A使用docker-compose.yaml部署了服务,然后想要在主机B部署一样的服务,按时迁移主机A里的数据,包含Mtab和mysql文件夹下的全部数据,然后再主机B恢复,会报错