I use HA in docker and back up all my volumes with restic.
For the recovery part
some of the services can be recovered by just copying current files and everything works
some can be restored the same way and the possible discrepancies between files that appeared during the back up time are self-healing
some require preparation work (dumping a DB for instance)
What is the case with HA?
Over the last 10+ years, I needed to restore HA once (after a major mistake on my side) and did a few DRP exercises – all of them by just dumping the content of the last backup and hoping for the best (it worked!)
I want to make it more serious and I will set up in a moment an automation to use Backup - Home Assistant so I will be safe, but nevertheless I am curious if there are any special pre-backup actions that are taken by HA to ensure a smooth recovery.
All the files in your /config directory including the hidden .storage directory will be compressed into a tar archive. You can choose other HA locations to back up too (e.g. media folder). Add-on backups don’t apply to you.
Encryption of the archive is optional everywhere except if stored in the Nabu Casa cloud. Then it must be encrypted. The encryption requires a special python script to unencrypt, you cant use utilities like winrar. Encrypted archives will however be automatically decrypted when downloaded from the backup integration.
A recovery kit containing your encryption key is presented to you when you set up the backup. For the love of Bob save it somewhere safe off your system (you would be surprised how many don’t).
The schedules allow different numbers of backups to be kept at each location the backups are saved, e.g. I have 7 daily on my system and 30 on my NAS.
There is a sensor that reports backup events (e.g. started, finished, failed).
I moved from the SAMBA backup add-on to the core backup system a few weeks ago. It has been working well.