如何安全备份通过docker部署的seafile?

我通过docker部署的seafile
平时所有volume都配到docker-compose.xml的同一个目录
然后定期备份这个目录

硬盘挂了以后
我买了新硬盘,把备份复制到新硬盘里
但运行docker-compose.xml却没有成功运行

如果未变动配置文件,可能是你映射的目录不对,具体可以发出来看看

我也是通过docker-compose部署的seafile11.0.11,希望有一个简单易懂的备份攻略

您好,备份和恢复可以参考:备份和恢复 - seafile-manual-cn

有教程了嗎,兄der,求教程

建议你前期最好的方式就是你在compose.yml定义所有的存储都放到./下,当你要迁走的时候就对这compose.yml的目录进行打包 tar -zcvf xxxx.tar.gz /{compose.yml路径};到了新服务器 tar -zxvf xxxx.tar.gz 完后 docker compose up -d 完事

当然新服务器的映射路径一样才能docker compose up -d 哈

能否分享一下您的compose.yml内容

services:
db:
image: mariadb:10.11
restart: always
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=******** # Requested, set the root’s password of MySQL service.
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- ./seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net

memcached:
image: memcached:1.6.18
restart: always
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net

seafile:
image: seafileltd/seafile-mc:11.0-latest
restart: always
container_name: seafile
ports:
- “80:80”
volumes:
- ./seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=******** # Requested, the value shuold be root’s password of MySQL service.
- TIME_ZONE=Asia/Shanghai # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=@qq.com # Specifies Seafile admin user, default is ‘me@example.com’.
- SEAFILE_ADMIN_PASSWORD=
# Specifies Seafile admin password, default is ‘asecret’.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether use letsencrypt to generate cert.
- SEAFILE_SERVER_HOSTNAME=seafile.********.com # Specifies your host name.
depends_on:
- db
- memcached
networks:
- seafile-net

networks:
seafile-net: