Configuring off-site config backups with Duplicati using a local add-on

I use Duplicati generally, to backup my VMs to a personal off-site cloud but HA doesn’t yet have an add-on for this. So with the help of the very full docs at Developing an add-on I had a go at a local add-on. It wasn’t too scary and seems to work well. Here are the config files I used.

Critical points seem to be

  • Use init: false to bypass the default Docker system init.
  • Use host_network: true to expose port 8200 on the HA VM (taking care who can see it).

The first time you run the add-on it builds the duplicati image but afetrwards starts up quickly. I’m finding my way gradually with advanced HA config so any insightful comments are most welcome.

  • config.yaml
name: Duplicati
version: "1.1.1"
slug: duplicati
description: >-
  This is a local add-on which uses the Docker Hub duplicati image to carry out offsite backups
  of HA configs.
arch:
  - amd64
url: "https://hub.docker.com/r/linuxserver/duplicati"
ports:
  8200/tcp: 8200
host_network: true
init: false
map:
  - config:rw
environment:
  PUID: "0"
  GUID: "0"
  TZ: "Europe/London"
  • Dockerfile
ARG BUILD_FROM
FROM $BUILD_FROM
  • build.yaml
build_from:
  amd64: "lscr.io/linuxserver/duplicati:latest"

Hey, wonderful! I just discovered Duplicati and I started to use it everywhere! On my office servers, on my PCs, on cloud VMs… I love this software!
I was also thinking to make an add-on for Home Assistant as it would be a perfect companion for backups as, opposing to the built in solution will have:

  • scheduling
  • backup directly to every possible local, remote, cloud destination (between them OneDrive or Google Drive are so good…)
  • Maintain history of changes with minimum effort and minimum space as it manage to add to the backup only changed portions of files
  • A web UI to manage, check, restore part of backups

Luckily you’re started to work at this as I’m not used to docker…
If you want I can test the addon so that I can provide feedback. But you forgot to write the URL of your repo… Or maybe you didn’t create one yet?
Let’s work on that :slight_smile:

EDIT: damn, searching on google I’ve found this old issue of Frenk that did the same and stated that’s “not a solution to anyone” :frowning:

EDIT2: Hey, I’ve found this repo of an already done Duplicati Add-On! I’ll give it a try.

I strongly recommend reading the HA docs on creating your own addon. There are a couple of very good examples which only take a coupe of hours work to get up and running. You don’t need any Docker skills.

The three files I’ve posted are all you need to get duplicati running in HA but I’ve also created a github repo at GitHub - hunterdrayman/HA-Addons: Home Assistant Supervisor add-ons. I’ve tested backups and restores of the HA configs to my cloud server using the ssh remote. Works perfectly!

1 Like