2026-11-05 16:40:40 +00:00
|
|
|
# ha-backup v3.1.1
|
2026-11-05 16:28:52 +00:00
|
|
|
|
|
|
|
|
Go port of `home_assistant_backup.sh`. Uses the same `home_assistant_backup.conf`.
|
|
|
|
|
|
|
|
|
|
## Build
|
2026-11-05 16:40:40 +00:00
|
|
|
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o ha-backup .
|
|
|
|
|
|
|
|
|
|
Override the version at build time if needed:
|
|
|
|
|
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=3.1.2" -o ha-backup .
|
|
|
|
|
|
|
|
|
|
Check the version:
|
|
|
|
|
./ha-backup -version
|
2026-11-05 16:28:52 +00:00
|
|
|
|
|
|
|
|
Cross-compile examples:
|
|
|
|
|
GOOS=linux GOARCH=amd64 go build -o ha-backup-linux-amd64 .
|
|
|
|
|
GOOS=linux GOARCH=arm64 go build -o ha-backup-linux-arm64 . # Raspberry Pi / ARM NAS
|
|
|
|
|
|
|
|
|
|
## Run
|
2026-11-05 16:40:40 +00:00
|
|
|
./ha-backup # looks for home_assistant_backup.conf next to the binary, then in cwd
|
|
|
|
|
./ha-backup -config /path/to.conf
|
2026-11-05 16:28:52 +00:00
|
|
|
|
|
|
|
|
Requires `ssh` and `scp` on the machine running it. `jq` and `yq` are no longer needed.
|