home-assistant: Configure BURP backups

Take a snapshot of the history database first, then back up everything
in `/var/lib/homeassistant`.
ntfy
Dustin 2021-12-17 20:57:38 -06:00
parent fdfdaa6fe6
commit 739ffb2845
3 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,7 @@ mosquitto_listeners:
- port: 1883 - port: 1883
address: ::1 address: ::1
mosquitto_password_file: /etc/mosquitto/passwd mosquitto_password_file: /etc/mosquitto/passwd
mosquitto_acl_file: /etc/mosquitto/acl
apache_default_ssl_vhost: false apache_default_ssl_vhost: false
homeassistant_server_name: homeassistant.pyrocufflink.blue homeassistant_server_name: homeassistant.pyrocufflink.blue
homeassistant_update: false homeassistant_update: false
@ -17,3 +18,8 @@ zigbee2mqtt_update: '{{ homeassistant_update|bool }}'
collectd_df: collectd_df:
FSType: overlay FSType: overlay
IgnoreSelected: true IgnoreSelected: true
burp_backup:
- include: /var/lib/homeassistant
burp_backup_script_pre: /etc/burp/backup-pre.sh

1
hosts
View File

@ -11,6 +11,7 @@ bw0.pyrocufflink.blue
bw0.pyrocufflink.blue bw0.pyrocufflink.blue
cloud0.pyrocufflink.blue cloud0.pyrocufflink.blue
file0.pyrocufflink.blue file0.pyrocufflink.blue
hass2.pyrocufflink.blue
[burp-server] [burp-server]
burp1.pyrocufflink.blue burp1.pyrocufflink.blue

View File

@ -0,0 +1,4 @@
#!/bin/sh
sqlite3 /var/lib/homeassistant/home-assistant_v2.db \
".backup '/var/lib/homeassistant/home-assistant_v2.db.bak'"