Warning
This Repository is now archived, because the feature got implemented upstream. See this PR for reference: borgmatic-collective/docker-borgmatic#324.
You might still want to follow part of the instructions to setup rclone initially.
This repository extends the Docker image for Borgmatic. It adds rclone to the image to make it easy to sync backups to remotes other than ssh.
Important
Before you start, head over to the Borgmatic repository to find out how to use the image.
-
Copy
.env.template
to.env
and modify them to match your setup. -
Place your existing Borgmatic config in
./data/borgmatic.d
or create a new one with this command:docker run -it --rm --mount type=bind,src="$(pwd)/data/borgmatic.d",target="/etc/borgmatic.d" ghcr.io/tuetenk0pp/borg-rclone bash -c "borgmatic config generate -d /etc/borgmatic.d/config.yaml"
-
Create a file
rclone.conf
with a valid remote config and place it here:./data/.config/rclone/rclone.conf
docker run -it --rm --mount type=bind,src="$(pwd)/data/.config/rclone",target="/root/.config/rclone" ghcr.io/tuetenk0pp/borg-rclone bash -c "rclone config"
-
Add this to your Borgmatic config and replace
RCLONE_DEST
with yourremote:bucket
you configured in the previous step:after_everything: - rclone sync /mnt/borg-repository RCLONE_DEST -P --stats 1m -v 2>&1 && echo Completed actions.
-
Optional: If you are starting new, initialize the repository with the following command:
# Borg 1.x docker compose run -it --rm borgmatic init --encryption repokey # Borg 2.x docker compose run -it --rm borgmatic rcreate --encryption repokey-aes-ocb
-
Use
docker compose up -d
to start the container and start taking backups 😎 .
docker build . -t tuetenk0pp/borg-rclone:dev