I stopped relying on Home Assistant’s backups and built my own with NAS snapshots instead

Home Assistant isn’t one of those apps you deploy once and forget all about it. It’s a growing smart home platform that evolves alongside the house with plenty of features, including integrated backups. But while it’s awesome that Home Assistant offers such a feature without relying on external solutions, I found myself not only creating Home Assistant backups but also deeper filesystem snapshots on my Synology network-attached storage (NAS), scheduled retention, and replication.

Running Home Assistant on Synology is a breeze

Lord of the Data: The Two Systems

Unlike a Raspberry Pi or some other devices, a NAS like a Synology DiskStation DS218+ is a powerful enclosure and one I relied upon to run many services before eventually making the switch to a more expansive NAS and then migrated all services to a home lab environment with dedicated hardware. I had Home Assistant running as a container within Synology’s DiskStation Manager (DSM), thanks to the availability of Container Manager, which makes self-hosting painless outside of Package Center.

It’s vital for any Docker container that everything is mapped out properly, including /config to a persistent folder on the NAS itself. This is easier when everything is local, like running services on the same device that actually stores network data. Here’s where Home Assistant stores components, automations, scripts, dashboards, integrations, and the database itself. And that’s the beauty and terror of Home Assistant. It’s a single app, but one that can handle MQTT, Zigbee, Node-RED, ESPHome, Frigate, and much more.

Home Assistant’s own backup system is pretty good. It’s easy to configure, use, and understand what’s going on. They’re especially useful before hitting the update button on all the core systems. The app can even handle automatic backups through scheduling and even offload them to other services like cloud storage. It’s fairly robust and feature-rich. Home Assistant backs itself up in such a way that it can be restored without trouble. They’re good, but they shouldn’t be relied upon as the sole data recovery route, which is what I changed.

They can start feeling insufficient

Home Assistant backups are app-level only. That means they relate to Home Assistant but may be completely oblivious to the wider stack. Container definitions, environment variables (env), Docker Compose files, USB device mappings, Frigate clips, and other important data may be lost and forgotten. Restoring has its place, but it can prove slower than simply rolling back on the system level. If a bad Home Assistant breaks the container for whatever reason, a snapshot from the system can be quicker than rebuilding Home Assistant.

And that’s the primary issue I had. Home Assistant backups are awesome, and you should absolutely do them. But restoring these backups is only really good if your Home Assistant is still up and running with no problems. Well, I say no problems, but nothing serious enough to affect the container stack itself. As well as Home Assistant keeping backups of its own state, I wanted my NAS to do the same at a system level, including the running Docker containers, which just so happens to cover Home Assistant.

Backing up the entire NAS

Making data recovery seamless

Because Home Assistant is running as a container, it’s vital I include all the necessary data when backing things up, as restoring an incomplete backup would ensure trouble down the road. Think of it like restoring a version of Windows without the registry. Snapshots are fully supported within Synology DiskStation Manager (DSM) and they’re pretty good. Though convenient and fast, consistent snapshots matter most, as all Home Assistant data needs to be present, which is where I planned out the strategy.

I created daily snapshots that are retained for two weeks. A monthly snapshot is kept for an entire year, which provides me with good access to various points in time. A Home Assistant installation is fairly fluid with different integrations, devices, and software all communicating and sharing data with one another. One Home Assistant installation can look and perform vastly different from another, and the same installation can be transformed in a short period with the right add-ons and other additional content.

Having a bedroom smart bulb stuck on full brightness at dusk with the window open leads to an insect-filled nightmare.

I’ve found that any time I’ve needed to roll back Home Assistant or restore from a backup, it didn’t take much to get to this point. Having both rapidly altering and longer cold storage-friendly backups is a healthy mix for keeping saves of the smart home platform. It’s important since, like many households, Home Assistant is the central core of our smart home. Without it, everything grinds to a halt. There are no proprietary hubs or cloud infrastructure to keep it running. Without Home Assistant, bulbs, sensors, plugs, and more all remain offline.

Having quick and reliable backups for getting Home Assistant back up and running ensures I can avoid any potential house-related troubles. I recall experiencing a bedroom smart bulb stuck on full brightness at dusk with the window open, leading to an insect-filled nightmare. There were moths and other small bugs everywhere during the warm months of summer, and that night they saw the giant glow of a “Vacanies!” sign.

Don’t forget the NAS itself

NAS aren’t perfect, nor are they immune to problems of their own. Backing up Home Assistant with snapshots and local copies is great, but your NAS could be physically stolen, damaged, or locked down with ransomware. That’s where backing up the NAS itself comes into play. Use external storage that can be connected to one of the available USB ports, cloud storage, or even another, less-capable NAS for maintaining a healthy backup strategy.

home assistant logo

OS

Windows, macOS, Linux

iOS compatible

Yes

Android compatible

Yes


Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *