Decryption utility for Home Assistant backups
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file decrypt_ha_backup-2024.1.27.1.tar.gz.
File metadata
- Download URL: decrypt_ha_backup-2024.1.27.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2fd865bef9d72ef0d4a71c2078dfc942838eb6237fc6f278c3a5986b9a27fd2e
|
|
| MD5 |
6264f0b7b5bbce97799979a813f7733d
|
|
| BLAKE2b-256 |
e1be2ff77c2fc7b84d4e12bb0dc1965fba8a1dcf60e8c54ae73e73ea36aea67b
|
File details
Details for the file decrypt_ha_backup-2024.1.27.1-py3-none-any.whl.
File metadata
- Download URL: decrypt_ha_backup-2024.1.27.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e70cdb3eab2585a69b814c3b6b585246be477db62fbf5617a7001cd9f4a8c51
|
|
| MD5 |
908dae5b20b6687f4674d9a3fcebd5bc
|
|
| BLAKE2b-256 |
f681121eee62f30e278f5fb271268e86d1fad8639c6bbdc256a350dd501de312
|