Quick Answer
Home Assistant backups (.tar files) contain your entire configuration, add-ons, history, and settings. Create one via Settings → System → Backups → Create Backup. For automated off-site backups, use the Google Drive Backup add-on (free) or Nabu Casa cloud backup ($6.50/month). Always test a restore before you need it — the process takes under 10 minutes.
Contents
What Does a Home Assistant Backup Actually Include?
A Home Assistant backup is a single compressed .tar file that includes:
- Configuration files —
configuration.yaml,automations.yaml,scripts.yaml,scenes.yaml, etc. - Add-on data — settings and data for installed add-ons (Mosquitto, ESPHome, etc.)
- Home Assistant Core data — integrations, user accounts, areas, entity registry
- Media files — if you have the media folder and choose to include it
- Database (optionally) — the
home-assistant_v2.dbhistory database - SSL certificates
Backups created in Home Assistant OS (HAOS) and Home Assistant Supervised are full system snapshots. Container and Core installs have more limited backup scope — only the config directory.
How Do You Create a Manual Backup?
Via the UI (HAOS/Supervised)
- Go to Settings → System → Backups
- Click Create Backup (top right)
- Choose Full backup or Partial backup
- Optionally set a name and password (for encryption)
- Click Create — takes 1–5 minutes depending on data size
Backups are stored in /backup/ on your Home Assistant OS device. You can download them directly from the Backups page by clicking the backup → three-dot menu → Download.
Partial vs Full Backups
- Full backup: Everything including all add-ons and their data. Safest. Larger file (often 500MB–3GB)
- Partial backup: Choose specific add-ons and/or Home Assistant config. Faster, smaller. Good for daily automated backups
Via the Developer Console
You can trigger a backup via the HA REST API — useful for scripting:
curl -X POST \ http://homeassistant.local:8123/api/services/backup/create \ -H "Authorization: Bearer YOUR_LONG_LIVED_TOKEN" \ -H "Content-Type: application/json"
How Do You Automate Backups?
Manual backups are a single point of failure — set up automation so you don't forget.
Using Home Assistant's Built-in Scheduler
As of HA 2024.6+, you can configure automatic backups directly:
- Go to Settings → System → Backups
- Click the gear/settings icon
- Enable Automatic backups
- Set schedule (daily at 3 AM is recommended), retention count (keep last 3–7)
Using an Automation (Older Method)
alias: Daily Backup
trigger:
- platform: time
at: "03:00:00"
action:
- service: backup.create
data:
name: "Daily_{{ now().strftime('%Y-%m-%d') }}"
Add this to your automations.yaml or create it in the Automations UI.
What Are the Best Off-Site Backup Options?
Local backups alone aren't enough — a house fire, flood, or SD card failure takes the backup with the system. Off-site backup is essential.
Option 1: Google Drive Backup Add-on (Free — Recommended)
The Home Assistant Google Drive Backup add-on (by sabeechen, installable via HACS or the Add-on Store) is the easiest off-site solution:
- Install from Add-on Store: search "Google Drive Backup"
- Open the add-on web UI and authenticate with your Google account
- Configure: number of backups to keep locally and in Drive, schedule, partial vs full
- The add-on creates backups on schedule and uploads to a dedicated Google Drive folder
It handles rotation automatically — delete old ones to stay within Google's free 15GB. A typical HA config backup (excluding history DB) is 50–200MB, so 15GB holds 75–300 backups. More than enough.
Option 2: Nabu Casa Cloud Backup ($6.50/month)
With a Home Assistant Cloud subscription, you get automatic encrypted cloud backup included. Configure under Settings → Home Assistant Cloud → Backups. Simple, secure, no Google account required.
Option 3: Samba + NAS
Install the Samba Backup add-on and configure a NAS share as the backup destination. Backups are copied to your NAS after creation. Combine with a cloud sync tool on your NAS (Synology Cloud Sync, etc.) for true off-site redundancy.
Option 4: Rclone
Advanced users can use the Rclone add-on to sync the /backup folder to any cloud provider (S3, Backblaze B2, Dropbox, etc.). B2 costs roughly $0.006/GB/month — hosting 5GB of backups costs ~$0.30/month.
How Do You Restore a Home Assistant Backup?
Restoring from an existing, working HA instance is simple. Restoring to a fresh install (e.g., new hardware) takes a few extra steps.
Restore on Existing Instance
- Go to Settings → System → Backups
- Find your backup and click it
- Click Restore
- Choose Full or Partial restore
- Click Restore and confirm — HA will restart and apply the backup
Full restore takes 3–10 minutes. HA will be unavailable during this time.
Restore to Fresh Hardware (New Install)
- Flash a fresh HAOS image to your new SD card/SSD using Balena Etcher or the Raspberry Pi Imager
- Boot and complete the initial setup (skip onboarding if possible — click "Skip" on the welcome screen)
- Go to Settings → System → Backups
- Click the upload/import button (or drag and drop your .tar file)
- Select your backup file and click Restore
- HA will restore and restart — all your devices, automations, and settings return exactly as they were
How Do You Migrate Home Assistant to New Hardware?
Migrating from an aging Raspberry Pi 3 to a Pi 5 or a dedicated x86 mini-PC? The process is exactly the same as a fresh restore:
- Create a fresh backup on the old hardware
- Download the .tar file (Settings → Backups → three-dot menu → Download)
- Flash HAOS to the new hardware
- Restore the backup as described above
Zigbee/Z-Wave coordinators (USB sticks) need to be physically moved to the new hardware. The coordinator's device path may change — update your Zigbee2MQTT or ZHA settings if needed (/dev/ttyUSB0 may become /dev/ttyACM0).
Our Verdict
A robust backup strategy for Home Assistant means: daily automatic backups + off-site storage via Google Drive or Nabu Casa. Use the built-in scheduler for automation, the Google Drive Backup add-on for free off-site copies, and keep 3 local + 7 cloud backups as a baseline. Test a full restore at least once a year — knowing your backup works is as important as having one.
Frequently Asked Questions
How large are Home Assistant backup files?
Config-only backups are typically 50–300 MB. Full backups including the history database can be 500 MB to several GB. Exclude the database for daily backups and do a full backup weekly if history is important to you.
Can I restore a backup to a different Home Assistant installation type?
You can restore between different hardware running HAOS (e.g., Pi 4 → Pi 5 → NUC). Cross-install-type restoration (e.g., HAOS to Container) is not officially supported and may cause issues.
Are Home Assistant backups encrypted?
Optionally — you can set a password when creating a backup, which encrypts the .tar file. Nabu Casa cloud backups are always encrypted. If you set a password, you must enter it during restore.
How do I restore if I can't access the HA UI?
If HA won't start, you can restore using a USB drive: copy the backup .tar to a USB drive formatted as FAT32, plug it into your HA device, and use the Recovery mode. See the official HAOS documentation for exact steps.
Does the backup include Z-Wave and Zigbee device pairings?
Yes — Zigbee2MQTT and ZHA store device databases in their add-on data directories, which are included in full backups. After restoring to new hardware with the same USB coordinator, all your Zigbee devices reconnect automatically.
How many backups should I keep?
Keep at least 3 local backups and 7–14 cloud backups. This gives you roughly 2 weeks of daily rollback options, which is enough to catch most configuration mistakes that aren't immediately obvious.
SmartWired participates in the Amazon Associates Programme. We may earn a commission from qualifying purchases at no extra cost to you.