How to back up Home Assistant properly
A practical guide to securing your Home Assistant setup with reliable local backups and restore strategies.
Last updated: 2026-05-16
Backing up Home Assistant isn’t optional—it’s the difference between a 30-minute recovery and a weekend-long rebuild. After spending hours configuring automations, adding devices, and tuning integrations, a failed SD card or corrupted database wipes all that work. Here’s how to do it right.
Why Local Backups Beat Cloud
Most Home Assistant users run on modest hardware—Raspberry Pi, a mini PC, or something like a Home Assistant Yellow or Home Assistant Green. The default cloud backup options exist, but they introduce dependency on external services and add latency to restores.
Local backups give you control. You decide where data lives, how it’s protected, and how fast you can recover. If your internet goes down, you can still restore. If a cloud service changes terms or pricing, you’re not locked in.
The built-in Home Assistant backup tool covers the basics. It snapshots your configuration, database, and add-ons. But what it doesn’t do is automate offsite copies or version history beyond the last few snapshots. For stronger protection, layer additional strategies.
Core Backup Strategy: The 3-2-1 Rule
Apply the standard backup rule: three copies of your data, on two different media types, with one stored offsite. For Home Assistant, this translates to:
-
The daily automated snapshot — Home Assistant’s built-in backup runs on schedule. Configure it to retain 3-7 daily snapshots. This catches configuration drift and gives you recent restore points.
-
Weekly full-image backup — Use a tool like Duplicati or Restic to capture the entire Home Assistant VM or container as an immutable archive. Store this on local NAS or an external SSD. This matters more than you think—when your config breaks in ways the snapshot can’t fix, a full system image saves you.
-
Offsite copy — Copy those archives to a separate location. rsync to a remote server, a second NAS at a family member’s house, or encrypted cloud storage you control. A fire or theft that takes out your primary hardware shouldn’t also take your backups.
For hardware, consider running Home Assistant on something with proper storage. A Raspberry Pi with a quality SD card works for testing, but SD cards fail frequently in production — a well-documented HA community pain point. A mini PC like a Beelink SER6 MAX with an SSD performs better and survives longer. If you want official hardware, the Home Assistant Yellow includes NVMe expansion that makes local backups trivial.
What Actually Gets Saved
Home Assistant’s backup includes your configuration.yaml, YAML files, the database (home-assistant_v2.db), and installed add-ons. But some things slip through:
Secrets and API keys — These stay in .storage/core.secrets, which backs up fine. But when you restore to fresh hardware, you may need to re-enter some cloud API tokens.
History data — The long-term database grows large. Backing up months of history adds storage cost and restore time. Decide whether you need historical data or if recent states suffice. You can exclude long-term statistics from snapshots.
Add-on configurations — Each add-on stores data differently. The MariaDB add-on needs its own backup process. Zigbee coordinator backups (like ConBee III or Sonoff Zigbee 3.0 USB Dongle Plus) require backing up the coordinator firmware separately, not just the config.
If you use Z-Wave or Zigbee, document your network topology. After a restore, the network heals but devices may need re-inclusion. Having your zwave_js_known_devices.yaml and zigbee_devices.yaml handy speeds recovery.
Automating Without Pain
Manual backups get forgotten. Automate with Home Assistant’s built-in scheduler or use a simple cron job. Here’s what works:
The backup add-on can push snapshots to network locations via SMB, NFS, or SSH. Set retention to 3 local daily, 4 weekly, and 12 monthly. Then use a separate cron job to sync those archives to your offsite location.
Test restores quarterly. Restores commonly fail due to version mismatches between Home Assistant and add-ons. Better to catch that on a Tuesday evening than during an emergency.
If you run Home Assistant Container or Supervised, integrate backup into your existing infrastructure. A simple shell script calling ha backup --name "weekly-$(date +%Y%m%d)" works. Pair it with rclone to push archives to Backblaze B2 or a personal S3 bucket.
Tradeoffs Worth Knowing
Backups have costs. Storage grows over time as your database expands. Restores take longer with more history. Offsite copies require bandwidth and a destination.
If you use Home Assistant Yellow with the NVMe expansion, the SSD eliminates SD card failure but adds cost. Running a full x86 VM with ECC memory costs more but prevents silent data corruption. These aren’t required—most people succeed with basic setups—but they reduce failure modes.
For those with Hubitat or HomeKit alongside Home Assistant, remember those platforms have separate backup needs. Hubitat’s local backup is less thorough than Home Assistant’s; export configs regularly. HomeKit backups live in iCloud and Apple’s ecosystem—less granular control but automatic.
Quick Verdict
Back up Home Assistant locally with daily snapshots and weekly full-image archives stored on NAS or external SSD. Add one offsite copy to protect against physical loss. Test restores at least quarterly. The Home Assistant Green or Home Assistant Yellow make this straightforward with built-in NVMe support, but any decent mini PC with an SSD beats running off microSD cards. A few hours of setup now saves days of rebuilding later.