How meticulous are you when talking about backups? Do you plan in advance and play it safe or do you like to live on the bleeding edge? For a long time I was in the latter group of tech people, but now things have changed!
The problem
I run my Home Assistant instance on a Raspberry Pi 4 using a MicroSD memory card as the only storage. I know: only the brave! Quite some time is gone by since I started using it and the amount of data collected from all the sensors grows every day. Additionally the number of automations created overtime starts to be interesting and it would require some time to re-create them all from scratch (if I could remember them). A failure of the MicroSD would be a disaster, or at lease a big PITA.
The solution
This is an easy one! So you should do it too if you’re not doing backups yet :)
After testing my luck for way too long I finally took the time to read more about an add-on I heard multiple times but never tested: Home Assistant Google Drive Backup.
As the name says clearly the add-on allows to create backups of your Home Assistant instance and upload them on Google Drive. Installation is very easy and the documentation is really well done. Without getting into much detail (you can do your own research on the repository) the main interesting points are:
Creates backups on a configurable schedule
Uploads backups to Drive, even the ones it didn't create
Clean up old backups in Home Assistant and Google Drive, so you don't run out of space
Lots of options for customisation
Restore from a fresh install or recover quickly from disaster by uploading your backups directly from Google Drive
Personally I decided to go with the following settings:
keep 2 backups on HA
keep 5 backups on Google Drive
backup daily at 11.30PM
As I am not planning to move the Raspberry Pi from MicroSD to SSD anytime soon I guess at some point I’ll need to test if the restore process works smoothly as expected :D
Do backups!
Until next time!
Daniel