Add SHA-256 verification of copied backups (v3.3.0)
After copying a backup from Home Assistant, compare its SHA-256 (via sha256sum on the server) with a hash of the local file. On mismatch, delete the local copy and send an error notification; the remote backup is left in place so the run can be retried. If either checksum cannot be computed, the run fails rather than reporting an unverified copy as successful. - Add VERIFY_CHECKSUM config option (default true; "false" skips the check) - Make boolean config values case-insensitive (VERIFY_CHECKSUM, NTFY_ENABLED, DISCORD_ENABLED), so "True" now enables them. Previously only lowercase "true" did, so NTFY_ENABLED="True" silently left ntfy off - Bump version to 3.3.0
This commit is contained in:
1 parent
7f1a4186ea
commit
4c5dcd779d
2 files changed
+90
-8
No files matched your search
@@ -36,3 +36,12 @@ DISCORD_WEBHOOK_URL="DISCORD_WEBHOOK_URL" # Replace with your Discord webhook U
|
||||
# The file must be writable by the user running ha-backup, see the README
|
||||
# Set to "none" to disable logging to a file (console output is unaffected)
|
||||
LOG_FILE="/var/log/ha-backup.log"
|
||||
|
||||
## File Validation
|
||||
# Verify the local copy against the backup on the Home Assistant host using
|
||||
# SHA-256 (sha256sum on the server, compared with the hash of the local file).
|
||||
# If the hashes differ, the local copy is deleted and an error notification is
|
||||
# sent; the backup on the Home Assistant server is left untouched so you can retry.
|
||||
# Verification reads the whole file twice (once on each side), so it adds time
|
||||
# on large backups. Set to "false" to skip it. Accepts true/false in any case.
|
||||
VERIFY_CHECKSUM="true" # "true" (default) or "false"
|
||||
Reference in new issue
Block a user