基于官方标准docker-compose部署的nebulagraph集群的备份与恢复

我用基于官方标准docker-compose部署的nebulagraph集群,在参考
NebulaGraph使用docker-compose部署方式如何备份还原 - 文章 / NebulaGraph - NebulaGraph 技术社区 (nebula-graph.com.cn)
这篇文章后,实现了了br工具的备份功能,
但是,在用br进行恢复操作时,看日志显示 ,br恢复时,会将meta/storage/graph服务停止掉,导致恢复失败,此时再看 meta/storage/graph 对应的容器时,都已经停止了,不知是什么原因,
出错的日志如下:

块引用
/ # br restore full --meta metad0:9559 --storage local:///backup --name BACKUP_2024_08_15_07_30_15
{“level”:“info”,“meta address”:“metad0:9559”,“msg”:“Try to connect meta service.”,“time”:“2024-08-15T08:24:21.972Z”}
{“level”:“info”,“meta address”:“metad0:9559”,“msg”:“Connect meta server successfully.”,“time”:“2024-08-15T08:24:21.973Z”}
{“level”:“info”,“meta address”:“metad0:9559”,“msg”:“Try to connect meta service.”,“time”:“2024-08-15T08:24:21.973Z”}
{“level”:“info”,“meta address”:“metad0:9559”,“msg”:“Connect meta server successfully.”,“time”:“2024-08-15T08:24:21.974Z”}
{“level”:“info”,“meta address”:“metad1:9559”,“msg”:“Try to connect meta service.”,“time”:“2024-08-15T08:24:21.974Z”}
{“level”:“info”,“meta address”:“metad1:9559”,“msg”:“Connect meta server successfully.”,“time”:“2024-08-15T08:24:21.975Z”}
{“level”:“info”,“meta address”:“metad2:9559”,“msg”:“Try to connect meta service.”,“time”:“2024-08-15T08:24:21.975Z”}
{“level”:“info”,“meta address”:“metad2:9559”,“msg”:“Connect meta server successfully.”,“time”:“2024-08-15T08:24:21.975Z”}
{“host info”:“map[console:console:8888[AGENT]: (data: , root: ) graphd:graphd:8888[AGENT]: (data: , root: ) | graphd:9669[GRAPH]: (data: , root: /usr/local/nebula) graphd1:graphd1:8888[AGENT]: (data: , root: ) | graphd1:9669[GRAPH]: (data: , root: /usr/local/nebula) graphd2:graphd2:8888[AGENT]: (data: , root: ) | graphd2:9669[GRAPH]: (data: , root: /usr/local/nebula) metad0:metad0:8888[AGENT]: (data: , root: ) | metad0:9559[META]: (data: /data/meta, root: /usr/local/nebula) metad1:metad1:8888[AGENT]: (data: , root: ) | metad1:9559[META]: (data: /data/meta, root: /usr/local/nebula) metad2:metad2:8888[AGENT]: (data: , root: ) | metad2:9559[META]: (data: /data/meta, root: /usr/local/nebula) storaged0:storaged0:9779[STORAGE]: (data: /data/storage, root: /usr/local/nebula) | storaged0:8888[AGENT]: (data: , root: ) storaged1:storaged1:9779[STORAGE]: (data: /data/storage, root: /usr/local/nebula) | storaged1:8888[AGENT]: (data: , root: ) storaged2:storaged2:9779[STORAGE]: (data: /data/storage, root: /usr/local/nebula) | storaged2:8888[AGENT]: (data: , root: )]”,“level”:“info”,“msg”:“Get cluster topology from the nebula.”,“time”:“2024-08-15T08:24:21.975Z”}
{“backup”:“BACKUP_2024_08_15_07_30_15”,“level”:“info”,“msg”:“Check backup dir successfully.”,“time”:“2024-08-15T08:24:21.976Z”,“uri”:“local:///backup/BACKUP_2024_08_15_07_30_15”}
{“dir”:“/usr/local/nebula”,“host”:“graphd2”,“level”:“info”,“msg”:“Stop services.”,“role”:“GRAPH”,“time”:“2024-08-15T08:24:21.981Z”}
{“dir”:“/usr/local/nebula”,“host”:“storaged1”,“level”:“info”,“msg”:“Stop services.”,“role”:“STORAGE”,“time”:“2024-08-15T08:24:21.989Z”}
{“dir”:“/usr/local/nebula”,“host”:“storaged0”,“level”:“info”,“msg”:“Stop services.”,“role”:“STORAGE”,“time”:“2024-08-15T08:24:21.998Z”}
{“dir”:“/usr/local/nebula”,“host”:“metad1”,“level”:“info”,“msg”:“Stop services.”,“role”:“META”,“time”:“2024-08-15T08:24:22.007Z”}
{“dir”:“/usr/local/nebula”,“host”:“graphd1”,“level”:“info”,“msg”:“Stop services.”,“role”:“GRAPH”,“time”:“2024-08-15T08:24:22.014Z”}
{“dir”:“/usr/local/nebula”,“host”:“metad0”,“level”:“info”,“msg”:“Stop services.”,“role”:“META”,“time”:“2024-08-15T08:24:22.023Z”}
{“dir”:“/usr/local/nebula”,“host”:“graphd”,“level”:“info”,“msg”:“Stop services.”,“role”:“GRAPH”,“time”:“2024-08-15T08:24:22.032Z”}
{“dir”:“/usr/local/nebula”,“host”:“storaged2”,“level”:“info”,“msg”:“Stop services.”,“role”:“STORAGE”,“time”:“2024-08-15T08:24:22.041Z”}
{“dir”:“/usr/local/nebula”,“host”:“metad2”,“level”:“info”,“msg”:“Stop services.”,“role”:“META”,“time”:“2024-08-15T08:24:22.052Z”}
{“backup”:“BACKUP_2024_08_15_07_30_15”,“level”:“info”,“msg”:“Stop cluster successfully.”,“time”:“2024-08-15T08:24:22.062Z”}
{“addr”:“storaged1:9779”,“backup path”:“/data/storage/nebula_old_1723710262”,“level”:“info”,“msg”:“Backup origin storage data path successfully.”,“origin path”:“/data/storage/nebula”,“time”:“2024-08-15T08:24:22.063Z”}
{“addr”:“storaged1:9779”,“backup path”:“/usr/local/nebula/cluster.id_old_1723710262”,“level”:“info”,“msg”:“Backup origin cluster.id path successfully.”,“origin not exist”:false,“origin path”:“/usr/local/nebula/cluster.id”,“time”:“2024-08-15T08:24:22.064Z”}
{“addr”:“storaged0:9779”,“backup path”:“/data/storage/nebula_old_1723710262”,“level”:“info”,“msg”:“Backup origin storage data path successfully.”,“origin path”:“/data/storage/nebula”,“time”:“2024-08-15T08:24:22.065Z”}
{“addr”:“storaged0:9779”,“backup path”:“/usr/local/nebula/cluster.id_old_1723710262”,“level”:“info”,“msg”:“Backup origin cluster.id path successfully.”,“origin not exist”:false,“origin path”:“/usr/local/nebula/cluster.id”,“time”:“2024-08-15T08:24:22.065Z”}
{“addr”:“storaged2:9779”,“backup path”:“/data/storage/nebula_old_1723710262”,“level”:“info”,“msg”:“Backup origin storage data path successfully.”,“origin path”:“/data/storage/nebula”,“time”:“2024-08-15T08:24:22.066Z”}
{“addr”:“storaged2:9779”,“backup path”:“/usr/local/nebula/cluster.id_old_1723710262”,“level”:“info”,“msg”:“Backup origin cluster.id path successfully.”,“origin not exist”:false,“origin path”:“/usr/local/nebula/cluster.id”,“time”:“2024-08-15T08:24:22.067Z”}
{“error”:“get service status in host storaged1 failed: agent, get service status failed: rpc error: code = Unavailable desc = error reading from server: EOF”,“level”:“info”,“msg”:“Get dead services failed, try times=1.”,“time”:“2024-08-15T08:24:22.088Z”}
{“error”:“get service status in host metad1 failed: agent, get service status failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:8888: connect: connection refused"”,“level”:“info”,“msg”:“Get dead services failed, try times=2.”,“time”:“2024-08-15T08:24:23.090Z”}
{“error”:“get service status in host metad0 failed: agent, get service status failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:8888: connect: connection refused"”,“level”:“info”,“msg”:“Get dead services failed, try times=3.”,“time”:“2024-08-15T08:24:25.092Z”}
Fix failed when restore failed get service status in host metad0 failed: agent, get service status failed: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing dial tcp 127.0.0.1:8888: connect: connection refused”
Error: backup origin data path failed: move dir from /data/meta/nebula to /data/meta/nebula_old_1723710262 failed: agent, move dir failed: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing dial tcp 172.22.0.4:8888: connect: connection refused”
Usage:
br restore full [flags]

Flags:
-h, --help help for full

Global Flags:
–concurrency int Max concurrency for download data (default 5)
–debug Output log in debug level or not
–log string Specify br detail log path (default “br.log”)
–meta string Specify meta server
–name string Specify backup name
–s3.access_key string S3 Option: set access key id
–s3.endpoint string S3 Option: set the S3 endpoint URL, please specify the http or https scheme explicitly
–s3.region string S3 Option: set region or location to upload or download backup
–s3.secret_key string S3 Option: set secret key for access id
–storage string backup target url, format: ://.
: a string indicating which backend type. optional: local, s3.
now only s3-compatible is supported.
example:
for local - “local:///the/local/path/to/backup”
for s3 - “s3://example/url/to/the/backup”

{“level”:“fatal”,“msg”:“backup origin data path failed: move dir from /data/meta/nebula to /data/meta/nebula_old_1723710262 failed: agent, move dir failed: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 172.22.0.4:8888: connect: connection refused"”,“time”:“2024-08-15T08:24:28.094Z”}

块引用

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。