带 CIFS 挂载备份存储的 bup 远程服务器 docker-compose 配置
在我们之前的文章如何使用 docker-compose 在 5 分钟内设置 “bup remote” 服务器中,我们概述了如何使用 docker-compose 设置你自己的 bup 远程服务器。在阅读本文之前先阅读那篇文章!
本文提供了一个替代的 docker-compose.yml 配置文件,它**将远程 CIFS 目录挂载为 /bup 备份目录,而不是使用本地目录。**这在使用 NAS 和单独的 bup 服务器时最有用。
在此示例中,我们将使用用户 cifsuser 和密码 pheT8Eigho 挂载 CIFS 共享 //10.1.2.3/bup-backups。
注意:由于性能原因,CIFS 服务器(NAS)和 bup 服务器应该本地连接,而不是通过互联网。
bup_docker_compose.yml
# 使用 CIFS 挂载备份卷
# 注意:我们建议不要使用通过互联网挂载的存储
# 由于性能原因。相反,在本地部署 bup 远程服务器。
volumes:
bup-backups:
driver_opts:
type: cifs
o: "username=cifsuser,password=pheT8Eigho,uid=1111,gid=1111"
device: "//10.1.2.3/bup-backups"
services:
bup-server:
image: ulikoehler/bup-server:latest
environment:
- SSH_PORT=2022
volumes:
- ./dotssh:/home/bup/.ssh
- ./dropbear:/etc/dropbear
# BUP 备份存储:CIFS 挂载
- bup-backups:/bup
ports:
- 2022:2022
restart: unless-stoppedCheck out similar posts by category:
Bup, Docker, Networking
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow