
* Backup: make steps procedural, add related links - Style change: use numbered steps to make steps procedural - Add related topics - Add glossary term refs - Move manual configuration section to bottom, as it is probably less used than other information * Update source/_integrations/backup.markdown Co-authored-by: Joakim Sørensen <joasoe@gmail.com> * Update source/_integrations/backup.markdown Co-authored-by: Joakim Sørensen <joasoe@gmail.com> * Update source/_integrations/backup.markdown Co-authored-by: Joakim Sørensen <joasoe@gmail.com> * Update source/_integrations/backup.markdown Co-authored-by: Joakim Sørensen <joasoe@gmail.com> --------- Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
3.3 KiB
title, description, ha_category, ha_release, ha_quality_scale, ha_domain, ha_codeowners, ha_iot_class, ha_integration_type
title | description | ha_category | ha_release | ha_quality_scale | ha_domain | ha_codeowners | ha_iot_class | ha_integration_type | ||
---|---|---|---|---|---|---|---|---|---|---|
Backup | Allow creating backups of container and core installations. |
|
2022.4 | internal | backup |
|
Calculated | system |
The Backup {% term integration %} allows you to create and download backups for your {% term "Home Assistant Core" %} and {% term "Home Assistant Container" %} installations. This backup file can be used if you migrate to {% term "Home Assistant Operating System" %}.
If you use {% term "Home Assistant Operating System" %} or {% term "Home Assistant Supervised" %} , the back up functionality is already built-in. This integration is for {% term "Home Assistant Core" %} and {% term "Home Assistant Container" %} installations.
Services
The Backup integration exposes a service that can be used to automate the backup process.
Service {% my developer_call_service service="backup.create" %}
The {% my developer_call_service service="backup.create" %} service can be used to create a backup for your Home Assistant instance.
The service has no additional options or parameters.
Example service call:
service: backup.create
Example: Backing up every night at 3:00 AM
This is a YAML example for an automation that initiate a backup every night at 3 AM:
automation:
- alias: "Backup Home Assistant every night at 3 AM"
trigger:
platform: time
at: "03:00:00"
action:
alias: "Create backup now"
service: backup.create
Restoring a backup
Backups created via the Backup integration are located in your a subdirectory named backups
which are located in your configuration directory.
The {% term "Home Assistant Container" %} installation typically mounts this directory via docker-compose.yml
or docker run
to a directory of your choice.
The steps on recovering from a backup depend on the installation type and use case. Follow one of these steps:
-
If you use {% term "Home Assistant Operating System" %} or {% term "Home Assistant Supervised" %}:
- Follow the steps described in Restoring a backup.
-
If you use a {% term "Home Assistant Core" %} or {% term "Home Assistant Container" %} installation:
-
A Home Assistant backup is just a tar file of the configuration directory, plus some metadata.
-
To manually restore a backup, use the following command:
tar -xOf <backup_tar_file> "./homeassistant.tar.gz" | tar --strip-components=1 -zxf - -C <restore_directory>
-
-
If you migrate from a {% term "Home Assistant Core" %} or {% term "Home Assistant Container" %} installation to {% term "Home Assistant Operating System" %}:
- You can use these backup files during onboarding to recover your installation from backup.