From 5efbee725e3089b67ac10142693554541563052f Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 2 Jan 2022 12:07:12 -0600 Subject: [PATCH] home-assistant: Omit history DB from backups The state history database is entirely too big. It takes over an hour to create a backup of it, which usually causes BURP to time out. The data it stores isn't particularly interesting anyway. Instead of trying to back it up and ultimately not getting any backup at all, we'll just skip it altogether to ensure we have a consistent backup of everything else that is actually important. --- group_vars/home-assistant.yml | 3 +-- .../files/scripts/hass2.pyrocufflink.blue/backup-pre.sh | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 roles/burp-client/files/scripts/hass2.pyrocufflink.blue/backup-pre.sh diff --git a/group_vars/home-assistant.yml b/group_vars/home-assistant.yml index 0f8bd40..7fede05 100644 --- a/group_vars/home-assistant.yml +++ b/group_vars/home-assistant.yml @@ -21,5 +21,4 @@ collectd_df: burp_backup: - include: /var/lib/homeassistant - -burp_backup_script_pre: /etc/burp/backup-pre.sh +- exclude: home-assistant_v2.db* diff --git a/roles/burp-client/files/scripts/hass2.pyrocufflink.blue/backup-pre.sh b/roles/burp-client/files/scripts/hass2.pyrocufflink.blue/backup-pre.sh deleted file mode 100644 index ac91c77..0000000 --- a/roles/burp-client/files/scripts/hass2.pyrocufflink.blue/backup-pre.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -sqlite3 /var/lib/homeassistant/home-assistant_v2.db \ - ".backup '/var/lib/homeassistant/home-assistant_v2.db.bak'"