Home Assistant Backup Guide: Protect Your Configuration
You spent hours configuring automations, dashboards, and integrations. A corrupted SD card or a bad update can erase all of it in seconds. Automated backups take 5 minutes to set up and save you from starting over.
Part of our Home Assistant Ultimate Guide
Why Backups Matter
The Home Assistant community forums are full of posts that start with "I just lost everything." Failed SD cards, botched updates, accidental deletions, and corrupted databases are real risks that happen to real users. A backup strategy is not optional. It is the difference between a 5-minute recovery and a weekend-long rebuild.
SD Card Failure
Raspberry Pi SD cards have a limited number of write cycles. Home Assistant writes to the database continuously, which accelerates wear. Average SD card lifespan under HA workload: 1-2 years. When it fails, the data is usually unrecoverable.
Bad Update
A core update introduces a breaking change that breaks your custom integrations or YAML configuration. Without a backup from before the update, you are debugging in production with your family asking why the lights do not work.
Power Surge / Storm Damage
In Oklahoma, power surges from storms can fry electronics even with surge protectors. If your HA hardware is damaged, an offsite backup means you can buy new hardware and restore in under an hour.
Accidental Deletion
You deleted a complex automation while reorganizing. You overwrote a configuration file. You ran a YAML lint tool that reformatted everything and broke your includes. Human error is the most common cause of data loss in any system.
The 3-2-1 rule: Keep 3 copies of your data, on 2 different types of storage, with 1 copy offsite. For Home Assistant: your live system (copy 1), a local backup on a network share or USB drive (copy 2), and a cloud backup on Google Drive (copy 3, offsite). This guide shows you how to set up all three.
Built-in Backup System
Home Assistant has a built-in backup feature accessible from the UI. It creates a compressed tar archive of your entire installation. This is the foundation that all backup add-ons build on.
Creating a Manual Backup
- 1 Navigate to Settings > System > Backups in the Home Assistant UI.
- 2 Click Create Backup. Choose between a full backup (everything) or a partial backup (select specific folders and add-ons).
- 3 Give the backup a descriptive name (e.g., "Pre-2026.3 Update" or "2026-03-20 Nightly").
- 4 Wait for the backup to complete. A full backup of a typical installation takes 1-5 minutes. The system may be slightly slower during the process.
- 5 Download the backup file to your computer by clicking the three-dot menu next to the backup and selecting "Download." Do not rely solely on local storage. If the SD card fails, the local backup goes with it.
The Problem with Manual Backups
Manual backups only happen when you remember to do them. Most people create one after initial setup, forget for six months, make hundreds of changes, then lose everything when the SD card fails. The solution is automated backups, covered in the next section.
Automated Nightly Backups
These add-ons automate the entire backup process: create, compress, upload, rotate old copies, and notify you if something fails. Set it up once and your backups run every night without intervention.
Google Drive Backup Add-on
The most popular backup add-on in the Home Assistant ecosystem. Creates scheduled backups and automatically uploads them to your Google Drive, giving you both a local and offsite copy with zero manual effort.
Setup Steps
- 1. Install from the Add-on Store (search "Google Drive Backup")
- 2. Open the add-on UI and authenticate with Google
- 3. Configure schedule (default: daily at 3:00 AM)
- 4. Set retention (default: keep 5 local, 5 in Drive)
- 5. Optional: exclude database to reduce upload size
Features
- Automatic daily/weekly schedule
- Configurable retention (local and cloud separately)
- Partial backups (exclude database, specific add-ons)
- Notification on failure (via HA notification service)
- One-click restore from the add-on UI
Storage needed: ~500MB-2GB in Google Drive depending on backup size and retention count. Free Google accounts get 15GB.
Samba Backup Add-on
Backs up to a Samba (SMB) network share. Ideal if you have a NAS (Synology, QNAP, TrueNAS) or a shared folder on another computer on your network. Keeps backups on your local network for fast restores.
Best For
- Users with existing NAS storage
- Fast local restores (no download from cloud)
- Large backups that exceed free cloud storage
Limitations
- Not offsite (same house as HA)
- NAS must be powered and accessible
- Pair with Google Drive for 3-2-1 compliance
Local USB Drive
Plug a USB drive into your Home Assistant hardware and configure backups to save there. This is the simplest option if you do not have a NAS or want to avoid cloud services. Format the drive as ext4 (Linux) or NTFS, then mount it in HA OS.
Best For
- Raspberry Pi setups with no NAS
- Simple, no-cloud backup solution
- Moving backups to another location manually
Limitations
- Same physical location as HA (storm/fire risk)
- USB drives can fail too
- Manual rotation unless scripted
What Is Included in a Backup
A full Home Assistant backup captures everything you need to rebuild your smart home from scratch. Here is exactly what is inside the backup archive.
Included (Full Backup)
- Configuration files (YAML, JSON, scripts)
- Dashboard (Lovelace) configurations
- Add-ons and their configuration data
- Database (entity history and statistics)
- SSL certificates and secrets.yaml
- HACS custom components and integrations
- User accounts and authentication tokens
Not Included / Optional
- HA OS itself (reinstall from image, then restore)
- Zigbee/Z-Wave device pairings (stored on radio)
- Frigate recordings (stored separately)
- Large media files (can be included optionally)
- Database can be excluded for smaller backups
How to Restore a Backup
There are two restore scenarios: restoring to your existing installation (rolling back after a bad update) and restoring to fresh hardware (replacing a failed SD card or migrating to a new device).
Restoring to Existing Installation
- 1 Go to Settings > System > Backups.
- 2 Select the backup you want to restore. If restoring from Google Drive, the add-on UI shows remote backups too.
- 3 Choose Full Restore or select specific components (config only, specific add-ons). Full restore is safest for rollbacks.
- 4 Wait for the restore to complete (5-15 minutes). Home Assistant will restart automatically. Do not power off during this process.
Restoring to New Hardware
- 1 Flash HA OS onto the new hardware (SD card, SSD, or VM disk) using the official installation guide.
- 2 Boot the new hardware and navigate to
http://homeassistant.local:8123. - 3 On the onboarding screen, look for the "Restore from backup" link at the bottom. Click it.
- 4 Upload your backup file (downloaded from Google Drive or copied from your USB/NAS).
- 5 Wait for the restore to complete. Your dashboards, automations, integrations, and add-ons will all be restored. Re-pair any Zigbee/Z-Wave devices if you changed radio hardware.
Testing Your Backups
A backup you have never tested is a backup that might not work. The only way to know your backup strategy is solid is to actually restore one. Schedule a test restore at least once every 6 months.
How to Test Without Disrupting Your Live System
- VM method: Create a temporary virtual machine (VirtualBox, Proxmox) with HA OS, restore your backup there, and verify that the dashboard loads, automations are listed, and integrations show up. Delete the VM when done.
- Spare SD card method: Flash HA OS onto a spare SD card, boot your Pi from it, restore the backup, and verify. Then swap back to your production card.
- File inspection method: Download a backup, rename the .tar file, extract it, and manually verify that key files exist (configuration.yaml, automations.yaml, .storage/lovelace). Less thorough but better than nothing.
Set a calendar reminder: Every 6 months, test a restore. It takes 15-20 minutes and gives you confidence that when disaster strikes, you will be back online the same day instead of the same week.
Offsite Backup Strategy
Local backups protect you from software failures and corrupted SD cards. But they do not protect you from physical events that destroy the hardware. In Oklahoma, this is not hypothetical. Tornadoes, house fires, and severe flooding can wipe out everything in your home, including your backup drives.
Recommended Offsite Options
Google Drive (Easiest)
Use the Google Drive Backup add-on. 15GB free. Automatic, encrypted in transit, accessible from anywhere. This is what we recommend for most users.
Remote NAS / Second Location
If you have a Synology or NAS at a family member's house, use Samba Backup to write to a remote share over VPN. Full local control, no cloud dependency.
Encrypted Password Protection
Home Assistant backups support password encryption. Enable it in the backup settings if your backup contains sensitive data (API keys, passwords in secrets.yaml) and is stored on a shared or cloud service.
Frequently Asked Questions
Common questions about Home Assistant backup and restore.
How often should I back up Home Assistant?
At minimum, once a day with automated nightly backups. This is the default for most backup add-ons and catches any configuration changes you made during the day. Additionally, always create a manual backup before updating Home Assistant (core, OS, or supervisor) and before making major configuration changes. Updates are the number one cause of needing a restore, so having a backup from 5 minutes before the update is invaluable. Keep at least 3-5 rolling backups so you can go back multiple days if a problem is not discovered immediately.
What is included in a Home Assistant backup?
A full backup includes: (1) All configuration files (configuration.yaml, automations, scripts, scenes, customize files), (2) the Lovelace dashboard configuration, (3) installed add-ons and their individual configurations, (4) the Home Assistant database (home-assistant_v2.db) which contains all entity history and statistics, (5) SSL certificates, (6) secrets.yaml and other credential files, and (7) custom components installed via HACS. Media files in the /media folder and large database files can optionally be excluded to reduce backup size. A typical full backup for a home with 50-100 entities is 200-500MB.
Can I restore a Home Assistant backup to different hardware?
Yes, with some caveats. Backups are portable across hardware as long as you are restoring to the same installation type. An HA OS backup restores cleanly to another HA OS installation regardless of whether it is on a Raspberry Pi, NUC, or VM. If you are migrating from a Pi 4 to an Intel NUC, install HA OS on the new hardware, access the onboarding screen, and choose "Restore from backup" before creating a new user. Zigbee and Z-Wave devices may need re-pairing if the radio hardware is different (e.g., switching from a Conbee II to a SkyConnect), but your automations, dashboards, and configuration will transfer cleanly.
How large are Home Assistant backups?
It depends heavily on your database size and installed add-ons. A typical installation with 50-100 entities and the default 10-day database purge interval produces backups of 200-500MB. Installations with Frigate NVR, large databases (extended purge intervals), or many media files can produce backups of 2-5GB or more. You can significantly reduce backup size by excluding the database (useful for daily backups where you only care about configuration) or by reducing the database purge interval in your recorder configuration. Most users find that 500MB-1GB per backup is manageable for both local and cloud storage.
How do I automate Home Assistant backups?
The easiest method is the Google Drive Backup add-on (also called Home Assistant Google Drive Backup by sabeechen). Install it from the add-on store, authenticate with your Google account, and it will automatically create daily backups and upload them to your Google Drive. It handles rotation (deleting old backups after a configurable number), supports partial backups (exclude database, specific add-ons), and sends notifications on success or failure. For local automation, the Samba Backup add-on does the same thing but writes to a network share instead of Google Drive. Both support custom schedules via cron expressions.
Need Help Setting Up Backups?
We configure automated backup strategies for Oklahoma Home Assistant users. Google Drive backup, NAS integration, backup testing, and disaster recovery planning so your smart home is protected against anything Oklahoma weather throws at it.
Or call us at (405) 785-7705
Related Guides
Home Assistant Ultimate Guide
The complete pillar guide to Home Assistant setup, configuration, and automation.
Best Home Assistant Add-ons
Essential add-ons including Google Drive Backup and Samba Backup setup guides.
Smart Home Storm Safety
Oklahoma storm preparedness including UPS backup and power outage protocols.
Smart Home Services
Professional Home Assistant installation and configuration for Oklahoma homes.