Skip to content

My take on a Borgbackup Server as a Docker container to facilicate the backing up of remote machines using Borgbackup

Notifications You must be signed in to change notification settings

cschlesselmann/borg-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Borg Backup Server Container

alt text

Description

A Borgbackup Server as a Docker container to faciliate the backing up of remote machines using Borgbackup

Dockerfile

FROM alpine:latest

#Install Borg & SSH
RUN apk add openssh sshfs borgbackup supervisor --no-cache
RUN adduser -D -u 1000 borg && \
    ssh-keygen -A && \
    mkdir /backups && \
    chown borg.borg /backups && \
    sed -i \
        -e 's/^#PasswordAuthentication yes$/PasswordAuthentication no/g' \
        -e 's/^PermitRootLogin without-password$/PermitRootLogin no/g' \
        /etc/ssh/sshd_config
COPY supervisord.conf /etc/supervisord.conf
RUN passwd -u borg
EXPOSE 22
CMD ["/usr/bin/supervisord"]

Usage

  • Container Creation:
docker create \
  --name=borg-server \
  --restart=always \
  -v ssh-host-keys:/etc/ssh \
  -v path/to/config/authorized_keys:/home/borg/.ssh/authorized_keys \
  -v path/to/backups:/backups \
  -p 2022:22 \
  ebrithil/borg-server

Note

After creating the container you will need to start the container add your own public keys

About

My take on a Borgbackup Server as a Docker container to facilicate the backing up of remote machines using Borgbackup

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 69.7%
  • Shell 30.3%