{"id":26821156,"url":"https://github.com/acaranta/home_assistant_backup_decryption","last_synced_at":"2026-04-30T00:03:52.718Z","repository":{"id":285065797,"uuid":"956690407","full_name":"acaranta/home_assistant_backup_decryption","owner":"acaranta","description":"A tool to allow you to extract and access your backed up data from Home Assistant Automatic Backups","archived":false,"fork":false,"pushed_at":"2025-03-29T08:30:19.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T09:27:26.392Z","etag":null,"topics":["backup","decrypt","home-assistant","homeassistant","securetar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acaranta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-28T17:29:05.000Z","updated_at":"2025-03-29T08:30:23.000Z","dependencies_parsed_at":"2025-03-29T09:37:44.134Z","dependency_job_id":null,"html_url":"https://github.com/acaranta/home_assistant_backup_decryption","commit_stats":null,"previous_names":["acaranta/home_assistant_backup_decryption"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/acaranta/home_assistant_backup_decryption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acaranta%2Fhome_assistant_backup_decryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acaranta%2Fhome_assistant_backup_decryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acaranta%2Fhome_assistant_backup_decryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acaranta%2Fhome_assistant_backup_decryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acaranta","download_url":"https://codeload.github.com/acaranta/home_assistant_backup_decryption/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acaranta%2Fhome_assistant_backup_decryption/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","decrypt","home-assistant","homeassistant","securetar"],"created_at":"2025-03-30T07:18:28.799Z","updated_at":"2026-04-30T00:03:52.703Z","avatar_url":"https://github.com/acaranta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home Assistant Backup Decryption Tool\n## Intro\nSince recent versions of Home Assistant, Backups are greatly imporved, automated and securely encrypted.\nHowever, if, as an advanced user you wish to extract data from  these backup files, there is no simple way to do so.\n\nThis tool is  here to help you with data extraction.\n\n## Input Files\nWhat you will need : \n- one (or more) Automated Backup file\n- your encryption key, or the backup emergency kit file\n\n### Automated Backup file\nTo download this file you will have to :\n- Go to your Home Assistant installation\n- Then Navigate to `Settings-\u003eSystem-\u003eBackups`\n- Select the Automated Backups list :\n![Backup list](doc/img/SC-Automated_Backups_List.png)\n- Finally, use the '...'  menu to download the file you require\n![Bakcup File](doc/img/SC-Automated_Backups_Item-Download.png)\n\n### Encryption Key\nTo get your encryption key, either you have (RECOMMENDED) stored it somewhere safe or :\n- Go to your Home Assistant installation\n- Then Navigate to `Settings-\u003eSystem-\u003eBackups-\u003eCONFIGURE BACKUP SETTINGS`\n- Scroll down and you will find :\n![Backup list](doc/img/SC-Encryption_key_get.png)\n- From here either :\n  - Use `Download emergency kit` to download your backup encryption emergency kit\n  - use `Show my encryption key` to copy it and use it as is\n\n\n## Run the Decryption tool\nFirst you need to prepare your data :\nCreate data directories and copy files :\n```\nmkdir -p ./input ./output\ncp Automatic_backup.*.tar ./input/\ncp home_assistant_backup_emergency_kit*txt ./input/\n```\n\n### Directly from your terminal\n- Get the this repository :\n```\nhttps://github.com/acaranta/home_assistant_backup_decryption.git\ncd home_assistant_backup_decryption\n```\n- Install needed env/modules :\n```\npython3 -m venv .venv\nsource .venv/bin/activate\npip3 install -r requirements.txt\n```\n- Run the script :\n```\n./hass_backup_decrypt.py -i ./input -o ./output\n```\n\n### Using docker image\n- You may build the image yourself :\n```\ndocker build -t acaranta/home_assistant_backup_decryption .\n```\n- Or use the image built from this repository : [acaranta/home_assistant_backup_decryption](https://hub.docker.com/r/acaranta/home_assistant_backup_decryption)\n- Then Run the image :\n```\ndocker run --rm -ti \\\n    -v $(pwd)/input:/input:ro \\\n    -v $(pwd)/output:/output \\\n    --user=$(id -u):$(id -g) \\\n    acaranta/home_assistant_backup_decryption\n```\n\n\n## Help and Options\nThe script has several options available that you can review using \n```\n./hass_backup_decrypt.py --help\n# or\ndocker run --rm -ti acaranta/home_assistant_backup_decryption --help\n\n🏠 Home Assistant Backup Decryption Tool\n=======================================\nusage: hass_backup_decrypt.py [-h] [-i INPUT] [-o OUTPUT] [-k KEY]\n\nHome Assistant Backup Decryption Tool\n\noptions:\n  -h, --help            show this help message and exit\n  -i INPUT, --input INPUT\n                        Input directory containing backup files (default: /input)\n  -o OUTPUT, --output OUTPUT\n                        Output directory for decrypted files (default: /output)\n  -k KEY, --key KEY     Encryption key (Format XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX)\n```\n\nNB : if the emergency kit is not found, and if you do not provide the encryption key as an option, you will be prompted to manually input it.\n\n## References :\nThe script idea comes from the script developped by [cogneato](https://github.com/cogneato/ha-decrypt-backup-tool) (idea and some part of the code).\nBut using as close as possible the same logic and modules (like [securetar](https://pypi.org/project/securetar/)) and keep as close as possible to the decryption methods used in [HA itself](https://github.com/home-assistant/core/blob/2121b943a32ebcbce7acb377cbf44c41d1805381/homeassistant/backup_restore.py#L92).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facaranta%2Fhome_assistant_backup_decryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facaranta%2Fhome_assistant_backup_decryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facaranta%2Fhome_assistant_backup_decryption/lists"}