Decrypt Home Assistant backups outside of Home Assistant for disaster recovery, inspection, or manual restoration.
No Python installation required!
-
Download the latest release for your platform:
- Windows:
decrypt_backup-windows-amd64.exe - macOS:
decrypt_backup-macos-amd64 - Linux:
decrypt_backup-linux-amd64
- Windows:
-
Place the executable in the same folder as your backup files
-
Windows: Double-click the
.exefilemacOS/Linux: Open Terminal and run:
chmod +x decrypt_backup xattr -d com.apple.quarantine decrypt_backup # macOS only ./decrypt_backup
That's it! The tool will automatically find your emergency kit and backup files.
Requirements:
- Python 3.7 or newer
cryptographypackage:pip install cryptography
Usage:
python3 decrypt_backup.py./decrypt_backupThe tool will:
- Automatically find your emergency kit file
- Search for backup
.tarfiles in the current directory - Prompt for your encryption key if needed
- Decrypt all backups found
# Provide encryption key directly
./decrypt_backup --key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
# Decrypt specific file
./decrypt_backup --key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX --file backup.tar
# Specify output directory
./decrypt_backup --key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX --output-dir ./my-backups
# Keep encrypted files after decryption (default removes them)
./decrypt_backup --key XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX --keep-encrypted
# See all options
./decrypt_backup --helpFor best results, organize your files like this:
my-backup-folder/
├── decrypt_backup # The executable
├── caa3ca81f524436da04edea103302316.tar # Your backup
└── home_assistant_backup_emergency_kit.txt # Your emergency kit (optional)
The tool will:
- Automatically detect and read your emergency kit
- Extract the outer
.tarfile - Decrypt all encrypted
.tar.gzfiles inside - Create directories with decrypted contents
This happens because the executable is not signed with an Apple Developer certificate.
Solution:
xattr -d com.apple.quarantine decrypt_backupOr go to System Preferences → Privacy & Security and click "Allow Anyway"
- Make sure the emergency kit filename contains both "emergency" and "kit"
- Or provide the key manually with
--keyflag
- Ensure you have the backup
.tarfile in the same directory - Or use
--fileto specify the exact path
- Keep your emergency kit secure - it contains your encryption key
- After decryption, store the decrypted files in a secure location
- The tool removes encrypted
.tar.gzfiles after successful decryption by default- Use
--keep-encryptedif you want to keep them
- Use
Issues and pull requests welcome! This tool was created to solve the problem of accessing encrypted HA backups when your instance is unavailable.
MIT License - feel free to use, modify, and distribute.