How to Back Up Your Home Assistant Configuration (The Right Way)

Your Home Assistant configuration represents months or years of work — automations, integrations, dashboard layouts, scripts, and custom code. Losing it to a failed SD card or corrupted update is devastating. This guide covers the right backup strategy for Home Assistant, with both local and off-site options.

The Three Backup Scenarios You Need to Survive

  • SD card / SSD failure: Hardware dies, need to restore to new hardware
  • Bad update: A Home Assistant update breaks something, need to roll back
  • Accidental deletion: Deleted an automation or integration by mistake

Your backup strategy should handle all three.

Built-in Home Assistant Backups

Home Assistant OS includes a backup system. Go to Settings → System → Backups. Each backup is a .tar file containing your entire configuration, including add-on data.

Click “Create Backup” before any major change — a new Home Assistant update, a significant configuration change, or adding a new integration. Configure automatic daily backups via a Home Assistant automation that calls backup.create on a schedule.

Where to Store Backups

Backups stored only on your Home Assistant host are useless if the hardware fails. You need at least two locations.

Option 1: Network Share (NAS)

If you have a NAS, configure Home Assistant to automatically copy backups to the NAS via the SMB/Samba integration or a Shell Command automation using rsync.

Option 2: USB Drive

Plug a USB drive into your Home Assistant host and configure the Samba add-on to expose backups. Manually copy backups to the drive periodically, or automate it with a Shell Command.

Option 3: Cloud Storage (Privacy-Conscious)

Use rclone (available as a Home Assistant add-on) to sync backups to an encrypted cloud storage provider. Backblaze B2 offers 10GB free. Encrypt before uploading if your backup contains sensitive automation data.

The Backup Automation

alias: "Daily Home Assistant Backup"
trigger:
  - platform: time
    at: "03:00:00"
action:
  - service: backup.create
    data:
      name: "Daily - {{ now().strftime('%Y-%m-%d') }}"

Testing Your Backups

A backup you have never tested is just a hope. Every few months, test your restore process on a spare SD card or in a VM. Go to Settings → Backups → select a backup → Restore. Verify your automations and configurations are intact.

Git for Configuration Version Control

Advanced users: use the Git Pull add-on or Studio Code Server git integration to version-control your configuration.yaml and related files in a private GitHub repository. This gives you a full history of every configuration change.