# 数据库备份

> 文档:`https://github.com/stefanprodan/mgob`

## 使用

1. 在config/添加配置
   config/3dshow.yaml
2. 启动服务:`docker-compose up -d`

## webapi

mgob-host:8090/storage file server  
mgob-host:8090/status backup jobs status  
mgob-host:8090/metrics Prometheus endpoint  
mgob-host:8090/version mgob version and runtime info  
mgob-host:8090/debug pprof endpoint  

## 恢复数据

1. 进入容器
   docker exec -it mongo-backup sh
2. 恢复命令
   mongorestore --gzip --archive=/storage/local-3dshow/local-3dshow1-1668757800.gz --host 3dshow-mongo:27017 --drop -u root -p 3dshow --authenticationDatabase admin