mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 18:36:51 +00:00
Add backup.create service (#22407)
* Add backup.create service * Tweak Co-authored-by: H. Kamran <hkamran@unisontech.org> Co-authored-by: H. Kamran <hkamran@unisontech.org>
This commit is contained in:
parent
8072d1fb6a
commit
4ece5bfa96
@ -31,3 +31,38 @@ You need to restart Home Assistant after you add this configuration.
|
|||||||
When it has started up again you will find a new "Backup" entry in the main menu (**Configuration** -> **Backup**).
|
When it has started up again you will find a new "Backup" entry in the main menu (**Configuration** -> **Backup**).
|
||||||
|
|
||||||
The backup files are stored in a new "backups" subdirectory in the root of your configuration directory.
|
The backup files are stored in a new "backups" subdirectory in the root of your configuration directory.
|
||||||
|
|
||||||
|
## 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:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
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:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
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
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user