Skip to main content

What is this?

This is a command-line python module that allows you to turn an encrypted Home Assistant backup (aka "Password Protected") into a non-encrypted backup. You might find this useful in situations such as:

  • Your backup has been corrupted and you're just trying to get what you can out of it.
  • You're trying to get just one or two files out of a backup without having to restore the whole thing.

Home Assistant backups are just compressed tar files but to encrypt them with a password it uses a non-standard encryption scheme. To the author's knowledge there is not way to decrypt these with standard compression/decompression tools which is why he wrote this little utility.

A note on reliability and expectations

This tool isn't sanctioned by the developers of Home Assistant and isn't updated in response to changes Home Assistant makes to the format of its backup files. This tool hacks apart a backup and then builds it back up, which makes it very sensitive to any changes the Home Assistant developers make to the backup file format.

It has been tested on backups created by Home Assistant version 2022.6.7. If you encounter an error using this tool please consider creating an issue for it on GitHub to notify the maintainer, you'll probably be helping many other users if you bring attention to an issue.

Installation

Make sure you have python 3 and pip installed on your system. Search around on Google for how to install them on your operating system. Then from the command line:

pip install decrypt-ha-backup

Usage

Download your backup from Home Assistant. Ensure you ahve at least twice the size of your backup available on your hard drive, and run:

python3 -m decrypt-ha-backup /path/to/your/backup.tar

You will be asked for the backup's password, after being processed the decrypted backup will be placed at /path/to/your/Decrypted backup.tar.

Optional Arguments

  • --password secret_password Specify the the password instead of being asked
  • --output_filename /path/to/output.tar Specify the output decrypted backup file name

Release files for decrypt-ha-backup 2024.1.27.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for decrypt-ha-backup 2024.1.27.1
File Size Uploaded
decrypt_ha_backup-2024.1.27.1.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for decrypt-ha-backup 2024.1.27.1
File Interpreter ABI Platform
decrypt_ha_backup-2024.1.27.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / decrypt_ha_backup-2024.1.27.1.tar.gz

Download URL decrypt_ha_backup-2024.1.27.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2fd865bef9d72ef0d4a71c2078dfc942838eb6237fc6f278c3a5986b9a27fd2e
BLAKE2b-256 checksum
How to use checksums
e1be2ff77c2fc7b84d4e12bb0dc1965fba8a1dcf60e8c54ae73e73ea36aea67b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.17

Release files / decrypt_ha_backup-2024.1.27.1-py3-none-any.whl

Download URL decrypt_ha_backup-2024.1.27.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e70cdb3eab2585a69b814c3b6b585246be477db62fbf5617a7001cd9f4a8c51
BLAKE2b-256 checksum
How to use checksums
f681121eee62f30e278f5fb271268e86d1fad8639c6bbdc256a350dd501de312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.17
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page