Skip to content

Instantly share code, notes, and snippets.

@AlecRust
Created March 5, 2023 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlecRust/0753ce12edae2aebc54f24fb3b92a172 to your computer and use it in GitHub Desktop.
Save AlecRust/0753ce12edae2aebc54f24fb3b92a172 to your computer and use it in GitHub Desktop.
Daily partial Home Assistant backup
alias: Daily Partial Backup
description: Create a partial backup (everything but media) every day at 02:00.
trigger:
platform: time
at: '02:00:00'
action:
# Stop all addons
- service: hassio.addon_stop
data:
all: true
# Create partial backup
- service: hassio.backup_partial
data:
# The sensors in this name depend on "Version" and "Time & Date" integrations
name: >-
NEW Daily Partial Backup {{ states('sensor.home_assistant_versions') }}
{{ states('sensor.date') }}
password: "!secret backups_password"
compressed: true
folders:
- /config
- /ssl
addons:
# Slug of all add-ons you want to backup
- core_samba
- core_ssh
- core_zwave_js
- 9074a9fa_cloudflared
# Start all addons
- service: hassio.addon_start
data:
all: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment