Home Assistant Backup Audit: What to Check Now
Auditing your Home Assistant backups means verifying that your backup files are complete, restorable, and stored safely before you need them. This article explains what a proper backup audit covers, how to test your backups, and how to fix common problems that leave you unprotected.
Why Backups Fail Silently
Home Assistant backups can look fine in the UI yet be useless when you try to restore them. The most common cause is a backup that completes with errors but still appears in the list. Another frequent issue is storage exhaustion: if the backup drive fills up mid-write, the file may be truncated or corrupted without any clear warning. Also, many users back up to the same device that runs Home Assistant, so a hardware failure destroys both the system and its backups. A silent failure often goes unnoticed until a restore attempt, which is why periodic audits matter more than the backup schedule itself.
What a Backup Actually Contains
A standard Home Assistant backup is a compressed archive that includes your configuration files, the database (unless you exclude it), add-ons, and their data. It does not include the Home Assistant operating system itself or the hardware settings. That means restoring a backup onto a fresh install gives you your configuration and history, but you must reinstall the OS and any add-ons from scratch if the whole device is lost. For a full disaster recovery, you need both a system image (like a full SD card image) and a regular Home Assistant backup. Knowing this distinction is the first step in an audit: you must decide what level of recovery you actually need.
How to Audit Your Backups
Start by listing what you have and where it lives. A thorough audit checks five things:
- Completeness: Does the backup include all your add-ons and the database? Open the backup file and compare the file list against your current configuration.
- Recency: Is the newest backup from today, or last week? If your automation changes daily, an old backup may not restore your latest work.
- Restorability: Have you actually tested a restore on a spare device or virtual machine? A backup that cannot restore is worthless.
- Off-site copy: Is there a copy in a different physical location or a cloud service? A single copy on the same machine is not a backup.
- Encryption and integrity: If you use encryption, can you still open the file with the passphrase? Check the file size and checksum against the original to detect corruption.
For a practical test, create a backup, then restore it into a fresh Home Assistant instance on a separate computer or a virtual machine. If the restore completes and your automations appear, the backup is valid. Do this at least once after any major configuration change, and quarterly as a routine.
Common Backup Problems and Fixes
Several issues appear repeatedly in Home Assistant backup audits. The most common are:
- Backup file too large: The database can balloon to gigabytes. Exclude the database from regular backups, or use the recorder’s
commit_intervalandpurgesettings to keep it small. For long-term history, back up the database separately. - Backup fails with “insufficient space”: Check the free space on the target drive. Home Assistant requires roughly twice the size of the backup during creation because it writes a temporary file.
- Encryption passphrase lost: If you enable encryption, you must remember the passphrase. There is no recovery. Write it down in your password manager and test that you can decrypt a backup after a few months.
- Backup to a network drive that disconnects: Verify that the network mount is stable and that Home Assistant can write to it. A failed mount often produces an empty or partial backup.
- Old backups never deleted: Set a retention policy. Keeping every backup for years wastes storage and makes it harder to find the one you need. A common rule is daily backups for 7 days, weekly for 4 weeks, and monthly for 6 months.
How to Choose a Backup Strategy
Your backup strategy should match how much change you make and how much data loss you can tolerate. For a typical smart home, a daily backup is sufficient, but if you edit YAML files every day, consider hourly. The key is to balance frequency with storage cost. A practical approach is:
- Keep the last 7 daily backups on the local device.
- Copy each daily backup to a separate USB drive or network share.
- Upload a weekly backup to a cloud service or a second location.
- Test the restore process at least once after every major upgrade.
If you use the Home Assistant operating system, the built-in backup tool is sufficient. For Home Assistant Core or a container setup, you need to back up the entire container or use the snapshot feature of your hypervisor. The principle is the same: you need a copy that is independent of the original system.
Costs and Storage Considerations
Backups cost storage, and storage costs money. A typical Home Assistant backup with the database is between 500 MB and 2 GB, depending on history length. Without the database, it is usually under 100 MB. Cloud storage prices vary, but a 2 GB backup uploaded weekly at typical rates is negligible. The real cost is time: restoring a large backup takes longer, and if you have to reinstall add-ons, that adds minutes to hours. A good rule is to keep the database out of the regular backup and have a separate, less frequent backup for history. This keeps your daily backups small and fast while still preserving your long-term data.
Safety and Security of Backup Files
Backups contain sensitive data: your Wi-Fi passwords, device tokens, and possibly camera feeds or location history. Treat backup files like your master keys. Encrypt them if you store them off-site, and never upload an unencrypted backup to a public cloud. If you use the built-in encryption, choose a strong passphrase and store it in a password manager. Also, be careful with backups that include the secrets.yaml file—it holds all your API keys and tokens. If an attacker gets that file, they can control your entire smart home. When you delete old backups, use a secure delete method if the drive is going to be disposed of.
Frequently Asked Questions
How often should I test a restore?
At minimum, test once after every major Home Assistant upgrade and once every three months. Upgrades can change the backup format or add new components that break older backups. A quarterly test on a spare device is a good habit.
Can I restore a backup from an older version of Home Assistant?
Generally yes, but not always. Restoring a backup from a much older version into a newer version usually works, but the reverse—restoring a new backup into an old version—fails because the old version does not understand the new format. Always keep a backup of your current version before upgrading.
Why is my backup file so large?
The main culprit is the database. If you have months of history, it can be hundreds of megabytes or even gigabytes. Exclude the database from your regular backup and instead back it up separately, or purge old history before creating a backup.
What is the difference between a backup and a snapshot?
In Home Assistant, the terms are used interchangeably. Both refer to a compressed archive of your configuration and add-ons. A full system image is different—it includes the operating system and can restore a device to a bootable state without reinstalling.
Should I back up to the same SD card that Home Assistant runs on?
No. If the SD card fails, you lose both the system and the backup. Store backups on a separate device, a USB drive, or a network location. The backup must be independent of the system it protects.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.