Balena Home Assistant / Backup / How To

Hi There!

I’m using both Docker and Home Assistant for a longer time, but I’m quite new here in Balena.

I’m very happy with the Balena platform, coz I had a lot of troubles with failing memory cards in my Raspberry P§s fleet, so spinning a new one is just a breeze.

Anyway, I’m trying to figure out how to make regular backups of my Home Assistant running on my RPi via Balena, but still don’t know what can be the best practice.

I just need to make regular backups somewhere (doesn’t matter where, like on the remote server, samba, cloud,., anything…). Like daily, weekly, keep some last X backups etc. But how to do it well?

I found this article but it seems to be a too bit complicated: Deploying Home Assistant with balena | by Tomás Migone | Medium

I was looking for some dedicated backup addons for HA but no luck.

When looking here: balena-homeassistant/docker-compose.yml at master · balenalabs-incubator/balena-homeassistant · GitHub
Maybe the easiest way is to add another container, mount this volume and make backups from this container?

Any ideas, best practices, or so? This is generally useful even for other balena projects…

Thanx for the help!

Hello @maxim Thank you for posting this interesting question.

You are right, the SD cards die and it’s a problem to deal with these situations. For example, we have colleagues running home assistant on balena Fin to get benefit of the use of an eMMC.

Currently on the balenaHub there is the duplicati block that helps to store encrypted backups from the SD cards.

Let us know if that works for you.

Related issue: I’d like to use duplicati to backup to a USB drive.

Individually, the

  • Duplicati block, and the
  • balena-storage (dynamically mount USB drives)

work as expected.

Now I’d like to “merge” the two, i.e. dynamically mount USB drives inside the duplicati service. My Dockerfile.template, below, fails with E: Unable to locate package findmnt.

Any suggestions for getting around this issue?

Dockerfile.template (straight from balana-storage except the FROM & apt-get statements):

FROM linuxserver/duplicati:latest

# Enable udev for detection of dynamically plugged devices
COPY udev/usb.rules /etc/udev/rules.d/usb.rules

# Install dependencies (install_packages not available)
RUN apt-get update && apt-get install -y \
  findmnt util-linux grep \
  && rm -rf /var/lib/apt/lists/*
RUN install_packages

WORKDIR /usr/src
COPY scripts scripts
RUN chmod +x scripts/*

# Change your CMD as needed (probably not needed?)
CMD [ "/bin/bash", "/usr/src/scripts/" ]


The image that you are using linuxserver/duplicati:latest is using an OS that doesn’t have the findmnt package. In my experience, this is usually because the package is named something different, or available as subcommand in a different package. Can you check if that’s indeed the case? You can do this by using the search feature of the under lying package manager