Skip to main content

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. Thenf rom the command line:

pip install decrypt-ha-backup

Usage

Download your backup from Home Assistant. Ensure you have at least twice the free space on your hard drive available, and run:

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

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

Optional Arguments

  • --password secret_password Pass in the password
  • --output_filename /path/to/output.tar Specify the output file name

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decrypt-ha-backup-2023.10.28.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

decrypt_ha_backup-2023.10.28.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file decrypt-ha-backup-2023.10.28.1.tar.gz.

File metadata

File hashes

Hashes for decrypt-ha-backup-2023.10.28.1.tar.gz
Algorithm Hash digest
SHA256 e4eca65f3d1960ebde1a40f11d0505967e84a4dffd7abf997702e0f69d4090e5
MD5 a8a93c467002b01f1e0ad905cdf35567
BLAKE2b-256 6186823aa81a2d2ad14a1e069b9d264b5f9f7091be07adaae64f203a9deebbcd

See more details on using hashes here.

File details

Details for the file decrypt_ha_backup-2023.10.28.1-py3-none-any.whl.

File metadata

File hashes

Hashes for decrypt_ha_backup-2023.10.28.1-py3-none-any.whl
Algorithm Hash digest
SHA256 005636fa1556a14b7dfcc2d727b2509581852bef03d4281fea02bb6ba480b427
MD5 8140f2fce03e47c42834fa37f28fa211
BLAKE2b-256 92b29b71e59e1350cfa34c8fc7733a666031a78ce069d0485831695bd60b716c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page