我们正在尝试实现一个备份脚本,该脚本将Docker卷归档在主群集节点上。任何保留卷数据的容器都将限制在该主节点上。我们的备份脚本在运行时会执行以下操作:
总结:
1. systemctrl stop docker
2. tar -cjvf ${BACKUP_PATH}/scuba-backup-$(date +%Y-%m-%d-%H%M).tar.bz /var/lib/docker/volumes/ /var/lib/docker/swarm/
3. systemctrl start docker
这似乎已经工作了一段时间了。我们先前已从备份中还原。
在本周的测试中,我们无法恢复。我们有一些容器会发出大致相同的消息:
{"CurrentState":"Failed 32 seconds ago","DesiredState":"Shutdown","Error":"\"starting container failed: container d00fe20ee9f7e9255acb48ce0ed0e8cc308752ee8076b3ae8bf3cf0797b97e0b: endpoint create on GW Network failed: failed to create endpoint gateway_46b8f70a043c on network docker_gwbridge: adding interface veth236e904 to bridge docker_gwbridge failed: exchange full\"","ID":"6biwbxin9id73whrk12mqmtux","Image":"scuba/as-backend:dev-latest@sha256:6b023f01970926699e327a0b7e773a1edd9bb063895240115f490f3b911eb0f0","Name":"scuba_analysis_backend.1","Node":"scuba-master-00","Ports":""}
我们已经运行:
sudo docker container prune -f
sudo docker network prune -f
sudo docker system prune -f
是什么原因导致这些备份引发网络错误?