Back up Home Assistant With Google Drive
A few years ago I woke up to a dead smart home. I had made some changes recently, and for SOME reason, I did not have a viable backup of my recent configuration. I had gotten cocky and lazy and assumed there would be more time to make a backup and there wasn’t. I was unable to rebuild my system for over a year due to a move to another state. Please learn from my mistake! Make frequent backups and store them in at least two different places!
Home Assistant backups are stored as snapshots. You should always have a backup plan. The importance of frequent, offsite backups cannot be stressed enough. Luckily, this is easy to accomplish with Home Assistant and Google Drive. You never think you’re the one who’s going to lose everything to a dead memory card, until it’s too late.
Create a Snapshot
- To create a snapshot, navigate to the Supervisor tab and choose Snapshots at the top of the screen.
- You can choose between full and partial snapshots. Click Create to create a snapshot.
- Your snapshot will be found in the Available snapshots section of this page.
Restore From a Snapshot
Any snapshot in the Available snapshots section can be used to restore your Home Assistant instance.
- Select your snapshot.
- Choose which aspect(s) of the snapshot you would like to restore.
- You can restore parts back to your currently running Home Assistant instance or you can wipe and restore from scratch.
- Confirm to restore Home Assistant.
- You will lose connection to Home Assistant while the restore takes place.
- When the restore is finished, Home Assistant will reconnect.
Install the Google Drive Backup Add-on
The Google Drive Backup add-on will create automatic snapshots and upload them to Google Drive. It is not found in the add-on store and will need to be added manually.
- Navigate to sabeechen’s GitHub repository and copy the URL.
- In the Home Assistant Add-on Store, open the menu on the top right of the screen and click Repositories.
- Paste the Github repository, add, then close the window.
- Scroll to the bottom of the page and select the add-on.
- Install and Start the add-on.
- After the add-on has been started, open the Web UI from the bottom of the screen or the sidebar.
- From the web UI, click Authenticate with Google Drive to log into your Google account and give it permission to access your drive.
Back up Snapshots with Google Drive
- After the initial setup, you can choose whether you want to provide error reports to the creator.
- Any snapshots you already have will be uploaded to your Google Drive.
- At the top of the page, click Settings to change your backup preferences.
- Now your backups are all set and saved!
Conclusion
This simple way to take and store backups offsite will be a lifesaver one day!