bup remote server docker-compose config with CIFS-mounted backup store
In our previous post How to setup a “bup remote” server in 5 minutes using docker-compose we outlined how to setup your own bup
remote server using docker-compose
. Read that post before this one!
This post provides an alternate docker-compose.yml
config file that mounts a remote CIFS directory as /bup
backup directory instead of using a local directory. This is most useful when using a NAS and a separate bup
server.
For this example, we’ll mount the CIFS share //10.1.2.3/bup-backups
with user cifsuser
and password pheT8Eigho
.
Note: For performance reasons, the CIFS server (NAS) and the bup server should be locally connected, not via the internet.
# Mount the backup volume using CIFS
# NOTE: We recommend to not use a storage mounted over the internet
# for performance reasons. Instead, deploy a bup remote server locally.
volumes:
bup-backups:
driver_opts:
type: cifs
o: "username=cifsuser,password=pheT8Eigho,uid=1111,gid=1111"
device: "//10.1.2.3/bup-backups"
version: "3.8"
services:
bup-server:
image: ulikoehler/bup-server:latest
environment:
- SSH_PORT=2022
volumes:
- ./dotssh:/home/bup/.ssh
- ./dropbear:/etc/dropbear
# BUP backup storage: CIFS mounted
- bup-backups:/bup
ports:
- 2022:2022
restart: unless-stopped