Borgbackup Server Container
1.5K

Borgbackup Server Docker is a fork of the original work from Grantbevis/borg-server
In this fork, I have updated all the packages to the latest version (at the time of writing) for the best of security and functionality. I also fixed permission errors that may occur on some Linux distros. For complete open source project, please visit https://github.com/workleast/borgserver-docker
Xem hướng dẫn sử dụng bằng Tiếng Việt tại đây: https://workleast.com/sao-luu-du-lieu-bang-borg-backup-docker/
services:
borgserver:
restart: always
image: workleast/borgserver
container_name: borgserver
volumes:
- ${REPO_DIR}:/backups
- ${SSH_DIR}:/home/borg/.ssh
ports:
- "2022:22"
environment:
TZ: ${TZ}
TZ=Asia/Ho_Chi_Minh
REPO_DIR=path/to/repo
SSH_DIR=${PWD}/ssh
If you've already had your own SSH keys, place your ssh's public keys in the file 'ssh/authorized_keys'. Otherwise, you can use the built-in script to create one. Please see below for instruction.
docker compose up -d
This container uses 'borg' user with uid(1000):gid(1000) to login and write backup data to the REPO_DIR directory on your host (defined in .env file). However, different systems usually have different uid:gid for their users which may result in permission problems. To workaround with this, I have added a script in the container which synchronizes the ownership and permission of relevant files and directories.
docker exec -it borgserver fix-permission.sh
If you are not using your own SSH keys, you can use this script to generate one. Here is how to get it done
docker exec -it borgserver gen-sshkey.sh
Content type
Image
Digest
sha256:61f196c8b…
Size
28.1 MB
Last updated
over 1 year ago
docker pull workleast/borgserver