tsxcw / mtab

Mtab书签导航程序 - 免费无广告的浏览器书签助手,多端同步、美观易用的在 线导航和书签工具,自主研发免费使用,帮助您高效管理 网页和应用,提升在线体验。
https://mtab.cc
Other
374 stars 46 forks source link

使用docker-compose部署,需要怎么迁移数据到其它机器用相同的docker-compose部署,且保持数据一致呢 #9

Open FunkyGod opened 8 months ago

FunkyGod commented 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.
tsxcw commented 8 months ago

mtab在迁移的时候是没有问题的。但是Mysql的话需要重新部署后将原数据库导出的SQL文件导入。

YU-7 commented 1 month ago

作者有没有考虑支持多数据库,支持一下sqlite,感觉书签的话可能用轻量级的数据库就够用了。docker-composer这段` volumes: