Backups contain information about your accessories, groups, rooms, zones, scenes and automations. The data are stored in a
.hbk file which can then be used to restore your data. If you ever experienced data loss in HomeKit, you know how cumbersome it is to restore the data because iOS does not backup your HomeKit data.
To create a backup, go to App Settings and tap Create Backup. Then store the backup at a secure place, for example iCloud Drive.
To restore a backup, go to App Settings and tap Store Data. The choose a backup file and continue.
When creating a backup, it is important that all accessories are reachable. Otherwise the backup might be incomplete and the data cannot be restored correctly.
Please also note that if you delete an accessory from HomeKit, you have to manually add it again before restoring a backup. Apps are not able to restore deleted accessories because of technical reasons. If an accessory is not available in HomeKit while a backup is restored, any scene or automation, which uses this accessory, cannot be restored completely.
Complete recovery of the data is not guaranteed under all circumstances.