Automatic Backups

I’m open to suggestions on how to do this with a script and some automation but I’d also like an official feature that backs up all my configuration files. Reverting to last known good or previous version would be awesome too.

1 Like

I vote for an automated backup of my raspberry pi’s SD card.

1 Like

A while back, I was looking for a way to make periodic backups of my RPi’s SD card and I found this script. I don’t know how good it is, as I have yet to test it myself. Additionally, I would have to modify the script to store the backups on a share on my NAS through an NFS connection.

put the config directory under source control (git), or rsync the config dir somewhere else for backup

Just as a heads up, it doesn’t seem likely that a backup feature will ever get added to HASS. Such a feature is considered to be out of scope.

I would have to agree - as much as our systems may be new to us and used only for HA, there are other solutions and disciplines out there that would address this. It’s a little like expecting an airline to be responsible for hotel accommodation, meals and tours because they happened to transport us to a particular country. Home Assistant is about home automation, backups are about system management - not the same thing.

A slightly more comfortable version of an rsync based backup is rsnapshot which I am using for many years on Ubuntu backing up into an external hard-drive, and now also include the HA config folder. Similar to Apple’s time machine you can keep multiple versions in an hourly/daily/weekly/monthly schema.
No need to build a configuration backup feature into HA in my opinion.

1 Like

A similar approach is done by raspiBackup but much more configurable and flexible. A typical use case for raspiBackup is exactly what you are looking for: Create a backup of your running Raspberry on a NAS box connected via NFS.

Just read the summary and feature sections to get an idea about all capabilities of raspiBackup.

For those not using PI - I am using Crashplan which automatically backs up to my server as well as too the cloud. It is possible to get it working on a PI but it is not supported and when I tried it it broke the first time it tried to auto update itself.

If you are just looking to backup your configuration files, or any individual file really, this should work for you.