Home Assistant stores everything: every automation, integration, dashboard, device, and years of sensor history. This tutorial walks through setting up automatic daily backups that store copies in two independent locations so a single failure cannot wipe everything out.
Executive Summary#
The goal is a setup that requires no manual intervention. A backup runs every night, older ones are pruned automatically, and copies land on a local Unraid network share and Home Assistant Cloud simultaneously. If something goes wrong, you can restore in minutes.
Prerequisites#
- A running Home Assistant instance
- An Unraid server on the same local network
- A Home Assistant Cloud account (free trial or paid subscription)
- A dedicated Unraid user account for Home Assistant to use
Implementation#
Step 1: Create the Unraid Share#
In the Unraid web interface, go to Shares and create a new share for backups.
Key settings:
| Setting | Value |
|---|---|
| Share name | backup |
| Primary storage | Array |
| Allocation method | High-water |
Under SMB Security Settings, set Security to Private and disable guest access. Create a dedicated Unraid user for Home Assistant and give that user Read/Write access to the backup share under SMB User Access.
Step 2: Connect Home Assistant to the Share#
- Go to Settings > Backup
- Click Configure backup settings
- Scroll to Locations and click Manage network storage
- Click Add network storage and fill in the fields:
| Field | Value |
|---|---|
| Name | Unraid_Backup_Share |
| Usage | Backup |
| Protocol | Samba/Windows (CIFS) |
| Server | IP address of your Unraid server |
| Remote share | backup/Home Assistant |
| Username | your dedicated backup user |
| Password | that user’s password |
Click Connect. The share will appear in the Locations list if the credentials and path are correct.
Step 3: Configure the Automatic Backup Schedule#
Go to Settings > Backup > Configure backup settings and set the following under Automatic backups:
| Setting | Value |
|---|---|
| Schedule | Daily |
| Time | System optimal |
| Backup preference when updating | Backup before update |
| Retention | 3 backups |
System optimal lets Home Assistant pick a time between 4:45 AM and 5:45 AM. Retention set to 3 keeps the three most recent backups and deletes older ones automatically.
Step 4: Set Storage Locations#
Under Locations, enable the destinations for automatic backups:
- This system can be disabled. Backing up to the same device you are protecting adds little safety.
- Unraid_Backup_Share should be enabled as the primary backup target.
- Home Assistant Cloud should be enabled as a second independent copy. Note that Cloud only retains the most recent backup and has a 5 GB maximum size.
Step 5: Download the Encryption Key#
All Home Assistant backups are encrypted. Without the encryption key, a backup file is useless.
- Go to Settings > Backup > Configure backup settings
- Scroll to Encryption key
- Click Download emergency kit
Store this somewhere safe outside of Home Assistant, such as a password manager or a printed copy. If you ever change the encryption key, download a new emergency kit immediately.
Step 6: Verify the Setup#
Trigger a manual backup to confirm everything is working before waiting for the overnight schedule.
- Go to Settings > Backup
- Click Create backup and choose Full backup
- Select both Unraid and Cloud as locations
- Click Create
Once complete, go to Settings > Backup and confirm the status shows Backed up with 2 locations. On the Unraid side, browse to the backup share and confirm a .tar file is present in the Home Assistant subfolder.
Lab Notes & Troubleshooting#
Backup shows failed or no recent backup. Go to Settings > Notifications and look for a backup error. Common causes are the Unraid server being offline at the scheduled time, a credentials problem with the SMB share, or the backup exceeding the 5 GB Cloud limit.
Only stored in 1 location instead of 2. Check that the Unraid server was online during the backup window. Go to Backup settings > Locations and confirm both show as connected.
Cannot connect to the Unraid share. Confirm the backup share has SMB Export set to Yes, the dedicated user has Read/Write access, and the server IP has not changed. Consider setting a DHCP reservation for the Unraid server so its IP stays stable.
Restore fails with an encryption error. You need the encryption key that was active when the backup was created. Old backups require the old key. Keep emergency kit copies from before any key changes.
Backups are very large. History data grows over time and is included by default. Go to Backup data and consider disabling History or Media to reduce size.
Unraid share fills up. Manual backups are not pruned automatically. Check Settings > Backup > Show all backups and delete old manual backups if the share is filling up.
Summary#
You now have automatic daily backups running to two independent locations with no manual intervention required. The Unraid share holds the last three full backups as the primary restore target, and Home Assistant Cloud holds the most recent backup as a secondary safety net. Store your encryption emergency kit somewhere safe outside of Home Assistant and test a restore before you need it.