https://github.com/samrocketman/home-assistant-decrypt-backup
hassio-tar - A simple utility to decrypt Home Assistant backups similar to plain tar.
https://github.com/samrocketman/home-assistant-decrypt-backup
Last synced: 3 months ago
JSON representation
hassio-tar - A simple utility to decrypt Home Assistant backups similar to plain tar.
- Host: GitHub
- URL: https://github.com/samrocketman/home-assistant-decrypt-backup
- Owner: samrocketman
- License: apache-2.0
- Created: 2025-05-24T21:11:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-26T16:36:13.000Z (3 months ago)
- Last Synced: 2026-03-27T00:14:33.306Z (3 months ago)
- Language: Go
- Homepage:
- Size: 64.5 KB
- Stars: 19
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# hassio-tar
Named `htar` or `hassio-tar`. A simple utility to decrypt Home Assistant
backups similar to plain `tar`.
Pre-compiled binaries available from [releases page]; see under Assets.
Examples assume you download as `htar` within your shell `$PATH`.
# Example
## Set your decryption key
Set `HASSIO_PASSWORD` environment variable with your backup password.
```bash
export HASSIO_PASSWORD
read -ersp password:\ HASSIO_PASSWORD
```
> **Note**: If you are working from a dead drive backup, see my [HA password
> recovery guide].
## Decrypt your backup
Identify which inner tar file you wish to decrypt by using `tar` to list the
encrypted `tar.gz` files.
```bash
tar -tf backup.tar
```
List files within an encrypted `tar.gz`.
```bash
tar -xOf backup.tar inner-addon.tar.gz | \
htar | \
tar -tz
```
Extract files from an encrypted `tar.gz`.
```bash
tar -xOf backup.tar inner-addon.tar.gz | \
htar | \
tar -xz
```
# Build from source
Requires Go 1.23+.
```bash
go build -o htar ./go-hassio-tar
```
Or use GoReleaser to cross-compile all supported platforms:
```bash
make release-snapshot
```
# Testing
Tests run inside Docker for full isolation (works locally and in CI):
```bash
make test
```
# SecureTar support
Home Assistant uses a custom encryption format named [SecureTar].
| HA Backup format | Supported? | Home Assistant release |
| -------------------- | ------------------ | ---------------------- |
| SecureTar v1 | :x: | not supported |
| SecureTar v2 | :white_check_mark: | 2025.2.0 - 2026.2.x |
| SecureTar v3 | :white_check_mark: | 2026.3.0 - latest |
## Legacy shell script
If you are looking for the SecureTar v2 shell script, you may find it in the
[older 0.1.1 release].
# License
See [LICENSE](LICENSE).
Copyright 2025-2026 Sam Gleske - https://github.com/samrocketman/home-assistant-decrypt-backup/blob/main/LICENSE
Apache License - Version 2.0, January 2004
[HA password recovery guide]: https://github.com/samrocketman/blog/issues/90
[SecureTar]: https://github.com/home-assistant-libs/securetar
[older 0.1.1 release]: https://github.com/samrocketman/home-assistant-decrypt-backup/tree/v0.1.1
[releases page]: https://github.com/samrocketman/home-assistant-decrypt-backup/releases