Hi. I was looking for a way to easily unpack encrypted the Home Assistant backup file on MacOS and I didn’t find any easy ways
I wrote a small cli to be able to extract the backup.
Source Code
Install
Way 1
install by bash (for Linux and MacOs)
wget -qO- https://github.com/librun/ha-backup-tool/releases/latest/download/ha-backup-tool-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m).tar.gz | tar -xz
Way 2
Open link choose you OS & platrom and download file Unpack file and use
Way 3
If you have go run it
go install github.com/librun/ha-backup-tool@latest
Use
Extract full
Extract N archives by password to same location current files
ha-backup-tool extract -p XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX dir1/backup1.tar dir2/backup2.tar dir3/backupN.tar
Extract N archives by emergency file to different location dir
ha-backup-tool extract -e dir/emergency_file.txt -o dir/extract_backup dir1/backup1.tar dir2/backup2.tar dir3/backupN.tar
Extract part
Extract only media archive:
ha-backup-tool extract -e dir/emergency_file.txt -ic media.tar.gz dir1/backup1.tar
Extract media and share archive:
ha-backup-tool extract -e dir/emergency_file.txt -ic media*,share* dir1/backup1.tar
extract archive whose file name starts with core:
ha-backup-tool extract -e dir/emergency_file.txt -ic core* dir1/backup1.tar
Extract archive whose file name have influxdb
ha-backup-tool extract -e dir/emergency_file.txt -ic *influxdb* dir1/backup1.tar
extract archive whose file name starts with core and exclude archive whose file name end with server.tar.gz
ha-backup-tool extract -e dir/emergency_file.txt -ic core* -ec *server.tar.gz dir1/backup1.tar
More example
For more info open project on github