Installing a backup on fresh installed HA (2024.8.3) not possible - raspi4 with ssd
The problem
I tried to install a fresh instance of raspi os (on raspi4 with ssd) with HA using raspi imager...then the backup during onboarding...but no chance. Then I took an HA image, flashed it directly with raspi imager...then again...backup during onboarding - again nothing...
System Information
| version | core-2024.8.3 |
|---|---|
| installation_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| user | root |
| virtualenv | false |
| python_version | 3.12.4 |
| os_name | Linux |
| os_version | 6.6.31-haos-raspi |
| arch | aarch64 |
| timezone | Europe/Berlin |
| config_dir | /config |
Home Assistant Cloud
| logged_in | false |
|---|---|
| can_reach_cert_server | ok |
| can_reach_cloud_auth | ok |
| can_reach_cloud | ok |
Home Assistant Supervisor
| host_os | Home Assistant OS 13.1 |
|---|---|
| update_channel | stable |
| supervisor_version | supervisor-2024.08.0 |
| agent_version | 1.6.0 |
| docker_version | 26.1.4 |
| disk_total | 228.5 GB |
| disk_used | 4.1 GB |
| healthy | true |
| supported | true |
| host_connectivity | true |
| supervisor_connectivity | true |
| ntp_synchronized | true |
| virtualization | |
| board | rpi4-64 |
| supervisor_api | ok |
| version_api | ok |
| installed_addons |
Dashboards
| dashboards | 2 |
|---|---|
| resources | 0 |
| views | 0 |
| mode | storage |
Recorder
| oldest_recorder_run | 27. August 2024 um 16:07 |
|---|---|
| current_recorder_run | 27. August 2024 um 18:17 |
| estimated_db_size | 0.32 MiB |
| database_engine | sqlite |
| database_version | 3.45.3 |
supervisor_2024-08-27T16-18-58.748Z.log
What version of Home Assistant Core has the issue?
2024.8.3
What was the last working version of Home Assistant Core?
2024.8.2
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
If the attachment perhaps doesnt work, here are the logs:
if await backup.load(): ^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/backups/backup.py", line 308, in load raw_dict = json.loads(raw) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/init.py", line 341, in loads s = s.decode(detect_encoding(s), 'surrogatepass') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 514: invalid start byte[0m [32m2024-08-27 18:16:52.338 INFO (MainThread) [supervisor.addons.manager] Phase 'services' stopping 0 add-ons[0m [32m2024-08-27 18:16:52.338 INFO (MainThread) [supervisor.addons.manager] Phase 'system' stopping 0 add-ons[0m [32m2024-08-27 18:16:52.338 INFO (MainThread) [supervisor.addons.manager] Phase 'initialize' stopping 0 add-ons[0m [32m2024-08-27 18:16:53.383 INFO (MainThread) [supervisor.backups.manager] Restore d7d10241 starting stage docker_config[0m [32m2024-08-27 18:16:53.484 INFO (MainThread) [supervisor.backups.manager] Restore d7d10241 starting stage folders[0m [32m2024-08-27 18:16:53.495 INFO (SyncWorker_2) [supervisor.backups.backup] Restore folder share[0m [32m2024-08-27 18:16:53.498 INFO (SyncWorker_2) [supervisor.backups.backup] Restore folder share done[0m [32m2024-08-27 18:16:53.506 INFO (SyncWorker_4) [supervisor.backups.backup] Restore folder addons/local[0m [32m2024-08-27 18:16:53.509 INFO (SyncWorker_4) [supervisor.backups.backup] Restore folder addons/local done[0m [32m2024-08-27 18:16:53.515 INFO (SyncWorker_7) [supervisor.backups.backup] Restore folder ssl[0m [32m2024-08-27 18:16:53.518 INFO (SyncWorker_7) [supervisor.backups.backup] Restore folder ssl done[0m [32m2024-08-27 18:16:53.525 INFO (SyncWorker_3) [supervisor.backups.backup] Restore folder media[0m [32m2024-08-27 18:16:53.528 INFO (SyncWorker_3) [supervisor.backups.backup] Restore folder media done[0m [32m2024-08-27 18:16:53.529 INFO (MainThread) [supervisor.backups.manager] Restore d7d10241 starting stage home_assistant[0m [31m2024-08-27 18:16:53.973 ERROR (MainThread) [supervisor.jobs] Unhandled exception: Error -1 Invalid deflate block found Traceback (most recent call last): File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 303, in wrapper return await self._method(obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/homeassistant/module.py", line 456, in restore await self.sys_run_in_executor(_extract_tarfile) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/homeassistant/module.py", line 449, in _extract_tarfile backup.extractall( File "/usr/local/lib/python3.12/tarfile.py", line 2269, in extractall self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(), File "/usr/local/lib/python3.12/tarfile.py", line 2332, in _extract_one self._extract_member(tarinfo, os.path.join(path, tarinfo.name), File "/usr/local/lib/python3.12/tarfile.py", line 2415, in _extract_member self.makefile(tarinfo, targetpath) File "/usr/local/lib/python3.12/tarfile.py", line 2469, in makefile copyfileobj(source, target, tarinfo.size, ReadError, bufsize) File "/usr/local/lib/python3.12/tarfile.py", line 251, in copyfileobj buf = src.read(bufsize) ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/gzip.py", line 324, in read return self._buffer.read(size) ^^^^^^^^^^^^^^^^^^^^^^^ igzip_lib.IsalError: Error -1 Invalid deflate block found[0m [31m2024-08-27 18:16:54.121 ERROR (MainThread) [supervisor.backups.manager] Restore d7d10241 error Traceback (most recent call last): File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 303, in wrapper return await self._method(obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/homeassistant/module.py", line 456, in restore await self.sys_run_in_executor(_extract_tarfile) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/homeassistant/module.py", line 449, in _extract_tarfile backup.extractall( File "/usr/local/lib/python3.12/tarfile.py", line 2269, in extractall self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(), File "/usr/local/lib/python3.12/tarfile.py", line 2332, in _extract_one self._extract_member(tarinfo, os.path.join(path, tarinfo.name), File "/usr/local/lib/python3.12/tarfile.py", line 2415, in _extract_member self.makefile(tarinfo, targetpath) File "/usr/local/lib/python3.12/tarfile.py", line 2469, in makefile copyfileobj(source, target, tarinfo.size, ReadError, bufsize) File "/usr/local/lib/python3.12/tarfile.py", line 251, in copyfileobj buf = src.read(bufsize) ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/gzip.py", line 324, in read return self._buffer.read(size) ^^^^^^^^^^^^^^^^^^^^^^^ igzip_lib.IsalError: Error -1 Invalid deflate block found
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/supervisor/supervisor/backups/manager.py", line 428, in _do_restore task_hass = await backup.restore_homeassistant() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 311, in wrapper raise err File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 303, in wrapper return await self._method(obj, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/supervisor/supervisor/backups/backup.py", line 736, in restore_homeassistant await self.sys_homeassistant.restore( File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 316, in wrapper raise JobException() from err supervisor.exceptions.JobException[0m [32m2024-08-27 18:16:54.125 INFO (MainThread) [supervisor.backups.manager] Restore d7d10241 starting stage check_home_assistant[0m [32m2024-08-27 18:16:54.170 INFO (SyncWorker_4) [supervisor.docker.manager] Starting homeassistant[0m [32m2024-08-27 18:16:54.402 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready[0m [32m2024-08-27 18:17:00.468 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state freeze[0m [32m2024-08-27 18:17:00.468 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete[0m [32m2024-08-27 18:17:04.433 INFO (MainThread) [supervisor.homeassistant.core] Home Assistant Core state changed to APIState(core_state='RUNNING', offline_db_migration=False)[0m [32m2024-08-27 18:17:04.434 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance[0m
igzip_lib.IsalError: Error -1 Invalid deflate block found sounds like a corrupted backup archive
but why and how...since I use HA, I save all backups on my NAS, every Night at 0:00. I can open (unzip) them, there are files in it...so I couldnt tell, why this backup should be corrupt..HA saves it this way, so I assume, it should work. I would like to link the backup here, but I guess there are lots of private data in it :)
but why and how
don't know - maybe some solar flares or bad moon phase or just storage corruption 🤔😁
How exactly do you provide the backup archive to HA? Is it an upload via UI or ist it stored locally on HA or via some network mount? Is there enough free disk space left on your HA system? Further please provide the full supervisor log, the provided one seems to be truncated and there is the half of another error shown on top, but it's not complete
its the complete supervisor log, taken right away after the "fresh install".I connected my nas as "netzwerkspeicher"and saved a backup every night, via automation.After now flashing the ssd with a fresh HA and raspberry os via raspberry imager, I tried to installl the backup at the beginning of the onboarding, where you can upload a backup and I also tried to set up a fresh home assistant, startet it via onboarding and THEN went to system - backup - upload backup and tried to install it.So I tried both ways.Best regardsFreundliche Grüße, FrankAm 28.08.2024 um 16:05 schrieb Michael @.***>:
but why and how
don't know - maybe some solar flares or bad moon phase or just storage corruption 🤔😁 How exactly do you provide the backup archive to HA? Is it an upload via UI or ist it stored locally on HA or via some network mount? Is there enough free disk space left on your HA system? Further please provide the full supervisor log, the provided one seems to be truncated and there is the half of another error shown on top, but it's not complete
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
oh...and its a 256 gb ssd...formated and flashed with the raspi imager..or do I perhaps resize the partitions/volumes?Best regards,Freundliche Grüße, FrankAm 28.08.2024 um 16:16 schrieb Frank H. @.>:its the complete supervisor log, taken right away after the "fresh install".I connected my nas as "netzwerkspeicher"and saved a backup every night, via automation.After now flashing the ssd with a fresh HA and raspberry os via raspberry imager, I tried to installl the backup at the beginning of the onboarding, where you can upload a backup and I also tried to set up a fresh home assistant, startet it via onboarding and THEN went to system - backup - upload backup and tried to install it.So I tried both ways.Best regardsFreundliche Grüße, FrankAm 28.08.2024 um 16:05 schrieb Michael @.>:
but why and how
don't know - maybe some solar flares or bad moon phase or just storage corruption 🤔😁 How exactly do you provide the backup archive to HA? Is it an upload via UI or ist it stored locally on HA or via some network mount? Is there enough free disk space left on your HA system? Further please provide the full supervisor log, the provided one seems to be truncated and there is the half of another error shown on top, but it's not complete
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
its the complete supervisor log, taken right away after the "fresh install".I connected my nas as "netzwerkspeicher"and saved a backup every night, via automation.After now flashing the ssd with a fresh HA and raspberry os via raspberry imager, I tried to installl the backup at the beginning of the onboarding, where you can upload a backup and I also tried to set up a fresh home assistant, startet it via onboarding and THEN went to system - backup - upload backup and tried to install it.So I tried both ways.Best regardsFreundliche Grüße, FrankAm 28.08.2024 um 16:05 schrieb Michael @.>: but why and how don't know - maybe some solar flares or bad moon phase or just storage corruption 🤔😁 How exactly do you provide the backup archive to HA? Is it an upload via UI or ist it stored locally on HA or via some network mount? Is there enough free disk space left on your HA system? Further please provide the full supervisor log, the provided one seems to be truncated and there is the half of another error shown on top, but it's not complete —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>
ah, now I see more in the supervisor log - here, as an attachment. Hope this works now.
supervisor_2024-08-28T14-22-42.166Z.log
this really looks like a corrupted backup archive - if you have an older backup, please try this one
the youngest two backups disnt work..but isnt this an error, that needs to be fixed? I use the onboard backup function and it creates corrupt archives?Freundliche Grüße, Frank HünemannAm 28.08.2024 um 16:55 schrieb Michael @.***>:
supervisor_2024-08-28T14-22-42.166Z.log
this really looks like a corrupted backup archive - if you have an older backup, please try this one
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
the oldest backup that I still have gives a slightly different log - but still - HA looks like fresh installed, none of my configured integrations, no automations or scripts or helpers... supervisor_2024-08-28T16-20-01.113Z.log
when I flash the ssd via raspi imager, I get the newest HA OS ...from 21.08.24 I think. Could it be possible, to take an older version (and if, then HOW :) ) to flash the ssd and then try to use one of my backups? Or doesnt it make any sense.
Or could I "repair" a corrupt archive, where for example the backup.json is missing (Whenever I decompress an archive, I literally FOUND a backup.json)...
please extract the backup archive, which was used in https://github.com/home-assistant/core/issues/124753#issuecomment-2315485980 ("name":"2024-08-05 00:00:00","date":"2024-08-04T22:00:00.188840+00:00") and check the content of the backup.json
Hello, I'll check it. Hope, tomorrow..Best regards and thanksFreundliche Grüße, FrankAm 01.09.2024 um 20:47 schrieb Michael @.***>: please extract the backup archive, which was used in #124753 (comment) ("name":"2024-08-05 00:00:00","date":"2024-08-04T22:00:00.188840+00:00") and check the content of the backup.json
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
please extract the backup archive, which was used in #124753 (comment) (
"name":"2024-08-05 00:00:00","date":"2024-08-04T22:00:00.188840+00:00") and check the content of thebackup.json
Hello Michael, here the backup.json details: {"slug":"f4097732","version":2,"name":"2024-08-07 00:00:00","date":"2024-08-06T22:00:00.192348+00:00","type":"full","supervisor_version":"2024.08.0","addons":[{"slug":"core_configurator","name":"File editor","version":"5.8.0","size":0.0},{"slug":"core_ssh","name":"Terminal & SSH","version":"9.14.0","size":0.0},{"slug":"a0d7b954_vscode","name":"Studio Code Server","version":"5.15.0","size":0.0}],"crypto":null,"homeassistant":{"version":"2024.7.4","exclude_database":false,"size":0.0},"docker":{"registries":{}},"compressed":true,"protected":false,"folders":["share","addons/local","ssl","media"],"repositories":["https://github.com/music-assistant/home-assistant-addon","https://github.com/tsightler/ring-mqtt-ha-addon","local","https://github.com/hassio-addons/repository","https://github.com/esphome/home-assistant-addon","core"]} backup.json
Regards
Hey there @home-assistant/supervisor, mind taking a look at this issue as it has been labeled with an integration (hassio) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of hassio can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign hassioRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
hassio documentation hassio source (message by IssueLinks)
I seem to be having a similar issue. Trying to migrate to a new SSD and CM4 module with a fresh install and restore from backup. The onboarding just does nothing (no indication of failure or anything), it wasn't until I just "set it up" temporarily and tried to restore a backup that I could see those errors as above. Same point, too, always seems to be on the home_assistant step that it encounters the error. Installed version is 2024.11.1, backup version is a full backup of 2024.11.1.
I'm trying to restore a core-only backup from pre-install for 2024.11.1, so the backup is of 2024.11.0, we'll see if that goes any better...
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.