Backup restore fail HA online but server unavailable

Hi everyone,
I’m almost against the rope with restore of HA. Two days ago I found issues on my dashbords. I have them in yaml file and when I update them from the 3 dots, they randomly loose card or format the dashboard weirdly, with no sense. So I decided to restore a backup of few hours before into HA. My HA completely fall down, I could see it on my lan devices, ssh to it but server was down. So I decided to reinstall everything starting from a clean installation: I have sd and ssd card (I just moved the datas to the ssd, while the boot is from sd like owner of Home assistant suggest), I scanned both units and they are good, no issues. But I decided to flash them and start over with an full automatic backup from google drive installation of the day before (first time I restored a manual backup and I thought it was not completely done). Again, home assistant on lan, I can ssh but server down. I ssh it and get some errors in supervisor and core logs which I post there but I know what to do, I have no ideas these errors could be.
Thank you for the ones you’ll help me.
Copy here the supervisor and core logs:
Supervisor

21-11-23 00:28:59 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-23 00:29:30 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data foder /data/addons/data/15d21743_samba_backup
21-11-23 00:29:30 INFO (SyncWorker_3) [supervisor.docker.interface] Downloading docker image thomasmauerer/samba-backup-aarch64 with tag 5.0.0.
21-11-23 00:29:38 INFO (MainThread) [supervisor.addons] Add-on ‘15d21743_samba_backup’ successfully installed
21-11-23 00:33:06 INFO (MainThread) [supervisor.store.git] Cloning add-on GitHub - sabeechen/hassio-google-drive-backup: Automatically create and sync Home Assistant backups into Google Drive repository
21-11-23 00:33:09 INFO (MainThread) [supervisor.store] Loading add-ons from store: 64 all - 1 new - 0 remove
21-11-23 00:33:09 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-23 00:33:10 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-23 00:33:15 INFO (MainThread) [supervisor.addons] Creating Home Assistant add-on data folder /data/addons/data/cebe7a76_hassio_google_drive_backup
21-11-23 00:33:15 INFO (SyncWorker_2) [supervisor.docker.interface] Downloading docker image sabeechen/hassio-google-drive-backup-aarch64 with tag 0.105.2.
21-11-23 00:33:41 INFO (MainThread) [supervisor.addons] Add-on ‘cebe7a76_hassio_google_drive_backup’ successfully installed
21-11-23 00:34:31 INFO (MainThread) [supervisor.ingress] Update Ingress as panel for cebe7a76_hassio_google_drive_backup
21-11-23 00:34:34 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on sabeechen/hassio-google-drive-backup-aarch64 with version 0.105.2
21-11-23 00:34:36 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:34:36 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:34:36 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:34:36 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
21-11-23 00:36:28 WARNING (MainThread) [supervisor.api.ingress] No valid ingress session None
21-11-23 00:36:37 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:36:37 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
21-11-23 00:36:56 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:36:56 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
21-11-23 00:37:52 INFO (MainThread) [supervisor.api.middleware.security] /backups/new/upload access from cebe7a76_hassio_google_drive_backup
21-11-23 00:42:58 INFO (MainThread) [supervisor.backups.manager] Successfully imported cd369501
21-11-23 00:42:58 INFO (MainThread) [supervisor.api.middleware.security] /backups/cd369501/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:42:59 INFO (MainThread) [supervisor.api.middleware.security] /addons/cebe7a76_hassio_google_drive_backup/icon access from cebe7a76_hassio_google_drive_backup
21-11-23 00:43:04 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:43:04 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
21-11-23 00:43:43 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
21-11-23 00:43:43 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
21-11-23 00:45:34 INFO (MainThread) [supervisor.api.middleware.security] /addons/cebe7a76_hassio_google_drive_backup/icon access from cebe7a76_hassio_google_drive_backup
21-11-23 00:46:00 INFO (MainThread) [supervisor.backups.manager] Found 1 backup files
21-11-23 00:46:00 INFO (MainThread) [supervisor.backups.manager] Found 1 backup files
21-11-23 00:46:08 INFO (MainThread) [supervisor.backups.manager] Full-Restore cd369501 start
21-11-23 00:46:14 INFO (MainThread) [supervisor.jobs] ‘BackupManager.do_restore_full’ blocked from execution, system is not running - CoreState.FREEZE
21-11-23 00:46:17 INFO (MainThread) [supervisor.addons] Phase ‘AddonStartup.APPLICATION’ stopping 1 add-ons
21-11-23 00:46:17 INFO (SyncWorker_4) [supervisor.docker.interface] Stopping addon_cebe7a76_hassio_google_drive_backup application
21-11-23 00:46:20 INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning addon_cebe7a76_hassio_google_drive_backup application
21-11-23 00:46:20 INFO (SyncWorker_0) [supervisor.docker.interface] Stopping homeassistant application
21-11-23 00:46:36 INFO (MainThread) [supervisor.addons] Phase ‘AddonStartup.SERVICES’ stopping 0 add-ons
21-11-23 00:46:36 INFO (MainThread) [supervisor.addons] Phase ‘AddonStartup.SYSTEM’ stopping 0 add-ons
21-11-23 00:46:36 INFO (MainThread) [supervisor.addons] Phase ‘AddonStartup.INITIALIZE’ stopping 0 add-ons
21-11-23 00:46:36 INFO (MainThread) [supervisor.backups.manager] Restoring cd369501 folders
21-11-23 00:46:36 INFO (SyncWorker_4) [supervisor.backups.backup] Restore folder share
21-11-23 00:46:36 WARNING (SyncWorker_4) [supervisor.backups.backup] Can’t restore folder share: not a gzip file
21-11-23 00:46:36 INFO (SyncWorker_1) [supervisor.backups.backup] Restore folder media
21-11-23 00:46:36 WARNING (SyncWorker_1) [supervisor.backups.backup] Can’t restore folder media: not a gzip file
21-11-23 00:46:36 INFO (SyncWorker_0) [supervisor.backups.backup] Restore folder homeassistant
21-11-23 00:46:36 WARNING (SyncWorker_0) [supervisor.backups.backup] Can’t restore folder homeassistant: not a gzip file
21-11-23 00:46:36 INFO (SyncWorker_4) [supervisor.backups.backup] Restore folder addons/local
21-11-23 00:46:36 WARNING (SyncWorker_4) [supervisor.backups.backup] Can’t restore folder addons/local: not a gzip file
21-11-23 00:46:36 INFO (SyncWorker_1) [supervisor.backups.backup] Restore folder ssl
21-11-23 00:46:36 WARNING (SyncWorker_1) [supervisor.backups.backup] Can’t restore folder ssl: not a gzip file
21-11-23 00:46:36 INFO (MainThread) [supervisor.backups.manager] Restoring cd369501 Docker Config
21-11-23 00:46:36 INFO (MainThread) [supervisor.backups.manager] Restoring cd369501 Home-Assistant
21-11-23 00:46:36 ERROR (MainThread) [supervisor.backups.manager] Restore cd369501 error
Traceback (most recent call last):
File “/usr/src/supervisor/supervisor/backups/manager.py”, line 263, in do_restore_full
backup.restore_homeassistant()
File “/usr/src/supervisor/supervisor/backups/backup.py”, line 481, in restore_homeassistant
self.sys_homeassistant.refresh_token = self._decrypt_data(
File “/usr/src/supervisor/supervisor/backups/backup.py”, line 222, in _decrypt_data
data = padder.update(decrypt.update(b64decode(data))) + padder.finalize()
File “/usr/local/lib/python3.9/site-packages/cryptography/hazmat/primitives/padding.py”, line 159, in finalize
result = _byte_unpadding_check(
File “/usr/local/lib/python3.9/site-packages/cryptography/hazmat/primitives/padding.py”, line 101, in _byte_unpadding_check
raise ValueError(“Invalid padding bytes.”)
ValueError: Invalid padding bytes.
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state CoreState.RUNNING
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.SECURITY/ContextType.CORE
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.SUPERVISOR
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.CORE
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.PWNED/ContextType.ADDON
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.TRUST/ContextType.PLUGIN
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.checks.base] Run check for IssueType.FREE_SPACE/ContextType.SYSTEM
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.check] System checks complete
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state CoreState.RUNNING
21-11-23 01:18:40 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete

Core logs:

Blockquote2021-11-22 23:57:58 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
2021-11-22 23:57:58 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
2021-11-22 23:57:58 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
2021-11-22 23:58:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
2021-11-22 23:58:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
2021-11-22 23:58:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
2021-11-22 23:58:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py”, line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File “aiohttp/_http_parser.pyx”, line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message=“Bad status line ‘invalid HTTP method’”
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
2021-11-22 23:58:40 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /host/reboot request Server disconnected
2021-11-22 23:58:40 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/reboot -
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
2021-11-23 00:10:28 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /host/reboot request Server disconnected
2021-11-23 00:10:28 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/reboot -
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
2021-11-23 00:17:07 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /host/reboot request Server disconnected
2021-11-23 00:17:07 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/reboot -
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

1 Like

Hi @genga91 I just got the same problem as you. I try to remove the repository of google drive backup add-on then re-install it. It solved this problem for me.

1 Like

Hi, thanks for your reply. Let me understand better: were you able to access to server? I couldn’t (also on samba share, just ssh) so, how did you remove the google drive folder and reinstall the add-on?
I took a more drastic decision, I copied all the yaml file from past config folder and added into a new flashed sd with hassio. With a couple of hours of work I made it back.
Little tip for the future… do not absolutely make snapshots with password… you’ll not be able to decompress it till config folder. With no password instead you can take all the files. I was vere lucky cause I updated to a new version of hassio few hours before the problem and in this case makes a partial backup without a password, so I took files from there.

Unplug and connect it again :sweat_smile: In my case, it’s rasberry pi 4B

@genga91 The problem comeback again after it’s ok for 1 day. :sleepy:

My situation is the same. I just bought the rpi, all the hardware is new. First of all, I worked in windows virtual drive in order to understand HA. I liked it. I bought rpi 4 2gb. I uploaded the backup I created with samba on the Windows virtual machine to Rpi. After a long wait, the system turned on. I used it for 1 or 2 hours. then i unplugged it to relocate the pin. Couldn’t connect until morning. I decided to reinstall the system. and again it took my hours. still no backup loaded (…rejected connection) and I can’t get to it at all. In fact, it will take hours for this system to boot up every time there is a power cut. I need help on this topic. Otherwise I will throw it away completely. I am bored

Hi! Well i understand it’s sometimes frustrating to don’t see anything working but this is what we have to expect from a open source project where we can monitor and automate everything in our home from every productor or brand. I felt many times that feelings but… the only way to sort it out is to get into a problem and solve it, then go to second and try to solve everything. So a couple of question: from what I understand you made a clean installation, did you take hassio image from home assistant official integration? I suggest you from start to that one, it’s impossible you can’t connect through there… if you flash a new sd card and your rpi has internet connection you have to see server page. Be sure your rpi is connected to router (you can check if you find a home assistant instance through the IP address in your router). I suggest to connect with ethernet cable, more stable and secure connection.

1 Like

Thank you for your concern. I gave my hours for this system but I succeeded. The whole issue is the 32 gb sd card that I just bought, brand AURIS. My advice to friends who have problems like me would be to use a quality sd card. I installed my system on 10 SanDisc brand sd cards and it worked without any problems. read and write speed of the received sd card min. be class 10. I installed the system in 10 minutes and loaded my backup. I did not use balena while installing, I used raspberry imager.