Home Assistant backup: automatic backups and system recovery after failure
An SD card, SSD or entire device can fail without warning. A well-prepared backup lets you recover automations, integrations and dashboards instead of rebuilding the system from scratch.
Having one backup file is not enough. Backups should run automatically, exist away from the Home Assistant device, retain older versions and have the encryption key stored safely.
The key rule is simple: one device failure must not remove both your system and every copy of it.
A safe strategy in five steps
- Enable automatic backups on a regular schedule.
- Keep at least one copy outside the Home Assistant device.
- Retain several recent versions, not only the newest file.
- Store the emergency kit with the encryption key outside Home Assistant.
- Periodically verify access to the copies and practise restoring in a safe environment.
This is a practical application of the 3-2-1 principle: several copies, more than one storage medium and at least one copy away from the primary device.
Full and partial Home Assistant backups
A full backup includes the config, share, ssl and media directories, plus manually installed or created apps. This includes configuration, automations, dashboards, integration data and a database stored in the configuration directory.
A partial backup lets you select specific directories and apps. It can help when rolling back one part of a system, but it does not replace a full backup intended for complete recovery.
Local .tar archives are stored in /backup by default. They remain on the same device, so they do not protect against failure of that device's storage.
How to configure automatic backups
- Open Settings → System → Backups.
- Start automatic backup setup and download the emergency kit.
- Choose a schedule. The official documentation recommends daily backups, but frequency should reflect how often the system changes.
- Enable backups before updates if you want them proposed by default during updates.
- Set how many copies to retain. Older files are removed automatically.
- Select the data and destination locations.
A large Recorder database, media collection or share folder can make backup and restore much slower. Before migrating, check used storage in system information and remove unnecessary data.
Where to store backups
The simplest minimum is downloading copies to a computer or saving them to another network device. Home Assistant also supports locations exposed by integrations, including Google Drive, Microsoft OneDrive and Synology DSM. Home Assistant OS can use network storage configured for backups.
Home Assistant Cloud subscribers can store the latest backup, up to 5 GB, in the cloud. This copy is always encrypted. Because the cloud location retains one latest file, it is sensible to keep backup history in another location as well.
Good practice: use at least two destinations, such as local history on a NAS and one off-site copy. The available destinations depend on installed integrations and the installation type.
Emergency kit and recovery key
Home Assistant uses an encryption key to protect backups. Home Assistant Cloud copies are always encrypted, while encryption can be selected separately for other locations. Since version 2026.4, new encrypted backups use the modernised SecureTar v3 format; older backups remain supported.
The emergency kit contains the key and recovery information. Store it outside Home Assistant, ideally in a secure password manager and an additional protected offline copy.
Losing the key may make an encrypted backup impossible to restore. If you change the key, retain the old one because the new key will not decrypt older copies. While the running Home Assistant instance still holds the correct key, it can be downloaded again from backup settings.
How many backups should you keep?
There is no single correct number for every system. A sensible starting point is several recent daily backups, an extra copy from before a major update, and at least one recent copy stored outside the device.
Do not rely only on the newest backup. A configuration error or damaged data can be copied into it, while the problem may appear days later. Retention should let you return to a state from before the issue while fitting the available storage.
A backup is trustworthy only after checking it
Regularly confirm that backup jobs complete, copies appear at their destinations, files can be downloaded, and the emergency kit is available. A successful file creation message does not verify the entire recovery procedure.
Perform a full test on spare hardware or in an isolated environment. Do not run two identical restored instances on the same network or immediately attach radio coordinators. That can cause conflicts, duplicate automations or unintended device control.
Write down a short recovery procedure: where the copies are stored, where to find the key, how to install Home Assistant, and which USB devices must be moved. Repeat the test after major hardware or backup-storage changes.
Restore on new storage or hardware
- Replace the failed SD card or SSD, or prepare the target device.
- Install a fresh Home Assistant system for the new hardware and reach the welcome screen.
- Upload a local backup or sign in to Home Assistant Cloud if it holds the copy.
- Select the parts to restore. Choose everything for a complete migration.
- Enter the encryption key from the emergency kit and start restoring.
- Wait patiently. A large installation can take about 45 minutes, and temporary loss of the page is normal. Do not refresh during the process.
- Sign in with the credentials that were valid when the backup was created.
A backup can be restored to a different device type, for example when moving from a Raspberry Pi to a mini PC. The target needs enough free storage. Reconnect USB controllers, and use the proper Zigbee migration process if the Zigbee radio itself changes.
Post-recovery checklist
- Check integrations, devices and unavailable entities.
- Test critical automations, scenes and notifications.
- Open dashboards and verify history and the database.
- Check Zigbee, Z-Wave and other radio controllers.
- Verify apps, add-ons and external services.
- Confirm certificates, remote access and the mobile app.
- Reconnect network storage if required after migration.
- Review logs and repairs, then create a fresh backup of the working system.
Battery devices may remain unavailable until they wake. If the previous installation used HTTPS directly in the http integration, open the restored interface using an address beginning with https://.
What most often goes wrong
- Every backup is kept on the same SD card or disk as Home Assistant.
- The emergency kit exists only inside the system it is meant to rescue.
- Only one newest copy is retained.
- Failed jobs and free storage are never checked.
- A backup is created only before a risky change instead of regularly.
- A restore is started on a live system without checking what will be overwritten.
- Zigbee, remote access and automations are not verified after migration.
Frequently asked questions
Does a Home Assistant backup include automations?
Yes. Automations and the rest of the configuration are in the config directory included in a full backup.
Does a backup include Zigbee?
It includes integration configuration and network data stored by Home Assistant. Reusing the same coordinator is usually simpler. Changing the radio may require a separate Zigbee migration.
Can I restore a Raspberry Pi backup on a mini PC?
Yes. The official procedure supports moving to a different device type, provided there is enough storage and controllers are connected correctly.
Should a backup be stored off the device?
Yes. A local backup cannot help if the card or disk holding both the system and the backup fails.
What happens if I lose the encryption key?
Without the correct key and without access to an instance that still holds it, an encrypted backup cannot be restored.
How often should I create backups?
The official documentation recommends daily backups. A less frequently changed system can use another schedule, but always create a copy before a major update or change.
Can I return to an older backup?
Yes. Remember that selected parts of the current system are replaced with their state from the backup date, so later changes can be lost.
Does a backup replace storage checks and updates?
No. A backup limits the impact of failure but does not replace free-space checks, storage health monitoring, updates or regular maintenance.
Need help with Home Assistant backup or recovery?
If your system no longer starts, the SSD or SD card has failed, you want to move Home Assistant to new hardware, or you are not sure whether your backups are configured correctly, I can review the situation and help you restore the system safely.
Contact me.The initial assessment is free and without obligation. → click hereSources and currency
Checked on 17 August 2026 against current official Home Assistant materials:
- Creating, storing and restoring backups,
- Backup integration and automatic backups,
- Emergency kit and encryption key,
- Integrations that provide backup locations,
- Modernising backup encryption in 2026.
The interface and available locations can change with updates. Before restoring, check the documentation matching your Home Assistant version.
