How to decrypt a backup in linux?

tar -xvf backup.tar
./backup.json
homeassistant.tar.gz

then how do I decrypt homeassistant.tar.gz?


tar -xvzf homeassistant.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I then tried with password:


openssl enc -d -aes-256-cbc -in homeassistant.tar.gz -out homeassistant.tar -k "password_here"
bad magic number

Unless something has changed since the original release, that should be AES-128, not AES-256

I still get bad magic number unfortunately

I created a a simple shell script which uses gzip, tar, and openssl to decrypt backups. See Hassio-tar.sh - Decrypt Home Assistant backups with near-zero dependencies required

I’ve executed the binary file (Linux AMD 64). I executed it, but it produces no output at all.

If you’re referring to my scripts or the Go binaries; they read encrypted file from stdin and output to stdout the decrypted binary (tar.gz). There’s two project READMEs that cover how to use each.

Here is the binary README which is what you likely downloaded.

You can extract an addon to stdout using the following command.

tar -xOf backup.tar inner-addon.tar.gz | hassio-tar-linux-amd64 > decrypted.tar.gz