best

How to back up Home Assistant properly

Back up Home Assistant properly with the 3-2-1 rule: what actually gets saved, automation strategies for offsite copies, and the cloud-backup tradeoffs.

On this page
  1. Why Local Backups Beat Cloud
  2. Core Backup Strategy: The 3-2-1 Rule
  3. What Actually Gets Saved
  4. Automating Without Pain
  5. Tradeoffs Worth Knowing
  6. Quick Verdict

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 more than it used to. It backs up your configuration, database, and add-ons, and since the 2025.1 release it can run on a schedule and copy backups off the box on its own - to network storage, Home Assistant Cloud, Google Drive, or OneDrive - with a retention limit you set. What it still will not give you is a full disk image or a deep version history, so layer additional strategies on top.

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:

  1. 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.

  2. 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.

  3. 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. (The Yellow was discontinued for new sales in October 2025; if you can’t find one, a mini PC with an SSD or the Green works well too.)

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 — Anything you’ve put in secrets.yaml (in your /config directory, alongside configuration.yaml) is included in a full backup. Integration tokens added through the UI live in the .storage directory and are captured too. Even so, plan to re-authenticate some cloud integrations after restoring to fresh hardware — OAuth-style logins often need redoing by hand.

History data - The recorder database grows large. Backing up months of history adds storage cost and restore time. Long-term statistics live in that same database, so you cannot carve them out of a backup on their own; instead shrink the database itself with the recorder’s purge_keep_days (default 10) and its include/exclude filters, or leave the history data out of the backup entirely.

Add-on data — A full Home Assistant backup includes the data directory of every installed add-on, so the MariaDB add-on’s database and your Zigbee add-on’s files are captured automatically. The thing to keep separate isn’t firmware — it’s the Zigbee/Z-Wave network credentials. ZHA includes its network backup in normal Home Assistant backups; Zigbee2MQTT writes a coordinator_backup.json to its data directory (also captured) that you should additionally keep a standalone copy of. For Z-Wave JS, the network keys are what matter — back them up so a controller swap doesn’t force re-inclusion. (Our walkthrough on backing up and restoring a Zigbee network covers the coordinator side in depth.)

If you use Z-Wave or Zigbee, keep those coordinator/controller backups with the rest. After a restore, the mesh heals on its own as long as the new coordinator carries the original network credentials; without them, devices need re-inclusion one by one.

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:

Home Assistant’s built-in backup can write straight to network storage you add under Settings > System > Storage (CIFS/SMB or NFS - there is no built-in SSH target), and its retention is a single “keep the last N backups” setting rather than a daily/weekly/monthly rotation. If you want proper generational retention - 7 daily, 4 weekly, 12 monthly - that is a job for Restic, Borg, or Duplicati running against those archives, plus a cron job to sync them offsite.

Test restores quarterly, following our step-by-step guide to restoring Home Assistant from a backup. 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.

On Home Assistant OS (or a Supervised install, though Supervised was deprecated in May 2025 and is unsupported as of 2025.12), a shell script calling ha backups new --name "weekly-$(date +%Y%m%d)" works. Home Assistant Container has no Supervisor and therefore no ha CLI at all, so there you either call the backup.create_automatic action from an automation or stop the container and archive /config yourself. Either way, 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 Yellow makes this straightforward with its M.2 NVMe slot, but it was discontinued in October 2025, so that only helps if you already own one. The Home Assistant Green uses soldered eMMC, which still beats microSD, and any decent mini PC with an SSD works well too. A few hours of setup now saves days of rebuilding later.

Next steps

Compare this category side by side

If you want fewer opinions and more matrix-style tradeoffs, the comparison pages are the next stop.

See comparisons →

Inspect all products

The full product database keeps the caveats, setup notes, and compatibility details attached to each device.

Browse products →

Back up and read the explainers

If a buying guide feels too specific too fast, the guides section covers the broader local-first logic behind it.

Read guides →

Related articles

Best local-first smart home hubs

The best smart home hubs and controllers for people who care about local control, Home Assistant compatibility, and fewer long-term regrets.

Read article →

Best smart plugs with local control and energy monitoring

The best local smart plugs with energy monitoring for Home Assistant: real local control over Zigbee, Z-Wave, or Wi-Fi plus accurate power data, no cloud.

Read article →

Best local security cameras for Home Assistant

The best Home Assistant-friendly local camera options for buyers who care about RTSP, ONVIF, NVR compatibility, and lower cloud dependence.

Read article →
New guides and product notes, no inbox required. Follow via RSS →