How to enable Home Assistant backups to protect your smart home server

I’d estimate that it took me a whole day’s worth of effort to set up my smart home as it currently stands, from adding plugs and light bulbs to designing a layout and building the automations I depend on every day. Thankfully, I never have to worry about doing that again because I have a backup, and so should you.

Home Assistant makes backups for you

Protecting your Home Assistant server with a backup is easy, but it’s not a setting that’s enabled by default. If you haven’t gone out of your way to enable backups, you’ve been riding dangerously and it’s time to fix that.

Home Assistant backup selected data.

Once enabled, Home Assistant creates a backup of your smart home as it currently functions. That includes every device that you have added, every integration you are running, your personal settings, your automations, your scenes, your logs and history, and even your add-ons (software that runs alongside Home Assistant) if you want.

Without a backup, all of this will need to be set up again (and history or logs will be lost forever). Depending on the size of your smart home, this could range from a mild inconvenience to an entire weekend’s worth of effort. Just imagine pairing every smart switch, wall socket, or smart plug all over again. It’s easy to underestimate the effort involved if, like me, you built your smart home out gradually.

IKEA Inspelning smart plug. Credit: Tim Brookes / How-To Geek

I made this mistake once, and I’ve never forgotten it since. Thankfully, it was just as I was starting out with Home Assistant. I had set up a server so that I could try the platform out for myself, using a Mac mini and a VirtualBox virtual machine (VM). I decided my server needed slightly more room, so I resized the virtual disk, and my server would no longer boot (I wouldn’t recommend it).

The first thing I did when I finally got the server up and running again (with enough disk space), was turn on backups.

How to turn on Home Assistant backups

Turning on Home Assistant backups is trivially easy and can be done from the UI. In a web browser or companion app, head to Settings > System > Backups. Now click the “Set up backups” button and follow the instructions. As your backups will be encrypted, you’ll need to download the backup emergency kit, which includes a decryption key.

If you lose your decryption key, your backup is useless. Make sure you store your backup key somewhere safe, like in a location that’s being backed up to a (secure) cloud location.

With backups turned on, you’ll be able to come back to this menu to define the schedule (daily is recommended), the time (by default this will be between 4.45 am and 5.45 am), whether to back up right before an update is applied, and how many backups should be kept (the oldest will be deleted when the newest is created).

Home Assistant backup screen with backups enabled.

You can also choose what to back up. By default, this includes your settings, history, and all add-ons. You’ll need to specifically turn on media and items in your Share folder if you want to include them. Remember, you can always head back to Settings > System > Backups and click “Backup now” to create a manual backup at any time.

There’s another important step that you shouldn’t ignore.

Backups shouldn’t only live on your server

By default, Home Assistant will create backups that are stored only on your local machine. While this is better than nothing, it doesn’t do much for redundancy if something should happen to your server. For example, if your server’s drive fails, then the backup will go down with it. When I unintentionally nuked my own Home Assistant server, the whole VM went up in smoke.

This is an easy problem to solve thanks to the wonders of network shares. Head to Settings > System > Backups and under “Backup settings,” click on “Local backup only.”

Now, click on “Manage network storage” and click “Add network storage” to specify another location. You’ll need to set up a suitable location beforehand, either using an SMB share (Windows, Linux, or Mac) or using a NAS drive (NFS). Make sure your credentials are correct, and you’ll add another layer of redundancy to your Home Assistant server.

Home Assistant backup via SMB share.

But wait, there’s more!

Go further with cloud backups

If you want to add even more redundancy or you don’t want to bother with local network shares (perhaps your device isn’t always online, for example), cloud backup adds even more peace of mind to your Home Assistant setup.

I’ve already covered how I back up my own Home Assistant server to iCloud, so you should read that guide if you want to do the same. This is Mac-specific guidance that involves “exposing” the backup directory (which is /data/backup on a regular install), then copying the contents of that folder to an iCloud location shortly after the standard Home Assistant backup completes. The good news is that it’s still relatively straightforward, even on something like a Raspberry Pi.

Home Assistant backups stored in iCloud Drive.

You can, of course, also pay for Home Assistant Cloud to add this functionality to Home Assistant for the low price of $6.50 per month, along with hassle-free remote access and a few more advanced voice control methods.

Restoring Home Assistant backups

You have two options to restore backups: during onboarding or using an existing installation. Onboarding is the process that takes place immediately after setting up a new Home Assistant installation. For things to work smoothly, make sure you connect any external radios for Zigbee, Z-Wave, Thread, or Bluetooth that you’re using and that Home Assistant can see them (you may need to change VM settings, for example).

Now click “Upload backup” on the welcome screen to use a local backup file or select “Home Assistant Cloud” and sign in. Select what to restore, enter your encryption key when requested, then “Restore backup” and wait for the process to complete.

If you’d rather restore a backup on your current server (to roll back a recent change you have made), head to Settings > System > Backups and click “Show all backups.” Select a backup, then select what to restore, and then click “Restore” to begin.


If you’re running Home Assistant in a Docker container, you can technically make a backup by copying your entire config directory somewhere safe. Similarly, if you’re running Home Assistant in a VM, you can create a snapshot using your virtualization software of choice that can be restored if necessary.

Even so, it’s still worth taking the time to set up Home Assistant’s built-in backup tool.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top