sabeechen / hassio-google-drive-backup

Automatically create and sync Home Assistant backups into Google Drive
MIT License
3.11k stars 189 forks source link

Sync Issue following Supervisor upgrade. #649

Closed lumper5 closed 2 years ago

lumper5 commented 2 years ago
Description:
Issue developed following Supervisor upgrade on previously functioning system.

Addon version: 0.101.3 Home Assistant Version: 2022.6.7 Supervisor Version: 2022.06.2 Supervisor Channel: stable Hassos Version: 8.2 Docker Version: 20.10.14 Architecture: amd64 Machine: qemux86-64 Date: 2022-07-06T13:13:56.290284+00:00 Timezone: America/New_York Failure Time: 2022-07-06T13:12:31.603259+00:00 Last Good Sync: 2022-07-06T13:12:31.598699+00:00

Exception:

  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:133 (sync)
  addon/backup/model/model.py:216 (_syncSnapshots)
  addon/backup/ha/hasource.py:221 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:103 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:208 (_getHassioData)
  addon/backup/ha/harequests.py:175 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:941 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

Snapshots:

 {
    "HomeAssistant": {
        "snapshots": 2,
        "retained": 0,
        "deletable": 2,
        "name": "HomeAssistant",
        "latest": "2022-07-06T07:06:28Z",
        "size": "929.2 MB"
    },
    "GoogleDrive": {
        "snapshots": 10,
        "retained": 0,
        "deletable": 10,
        "name": "GoogleDrive",
        "latest": "2022-07-06T07:06:28Z",
        "size": "3.6 GB"
    }
}
Config:
 {
    "Setting.MAX_SNAPSHOTS_IN_HASSIO": 2,
    "Setting.MAX_SNAPSHOTS_IN_GOOGLE_DRIVE": 10,
    "Setting.DAYS_BETWEEN_SNAPSHOTS": 1.0,
    "Setting.SNAPSHOT_TIME_OF_DAY": "02:30",
    "Setting.USE_SSL": true,
    "Setting.SEND_ERROR_REPORTS": true
}
Addon Logs:
 07-06 09:10:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/info
07-06 09:10:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/core/info
07-06 09:10:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/supervisor/info
07-06 09:10:05 INFO [backup.ha.hasource] Requesting a new snapshot
07-06 09:10:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots/new/full
07-06 09:10:05 ERROR [backup.ha.hasource] Snapshot failed:
07-06 09:10:05 ERROR [backup.ha.hasource] 
  addon/backup/ha/hasource.py:364 (_requestAsync)
  /usr/lib/python3.8/asyncio/tasks.py:483 (wait_for)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:56 (createSnapshot)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:213 (_postHassioData)
  addon/backup/ha/harequests.py:175 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:941 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots/new/full')

07-06 09:10:05 DEBUG [backup.model.syncer] Sync requested by HomeAssistant
07-06 09:10:05 INFO [backup.model.coordinator] Syncing Snapshots
07-06 09:10:05 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 09:10:05 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:133 (sync)
  addon/backup/model/model.py:216 (_syncSnapshots)
  addon/backup/ha/hasource.py:221 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:103 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:208 (_getHassioData)
  addon/backup/ha/harequests.py:175 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:941 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 09:10:05 INFO [backup.model.coordinator] I'll try again in an hour
07-06 09:10:26 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/addons/self/info
07-06 09:10:26 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/info
07-06 09:10:26 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/core/info
07-06 09:10:26 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/supervisor/info
07-06 09:10:37 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/addons/self/info
07-06 09:10:37 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/info
07-06 09:10:37 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/core/info
07-06 09:10:37 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/supervisor/info
07-06 09:11:29 INFO [backup.model.coordinator] Syncing Snapshots
07-06 09:11:29 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 09:11:29 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:133 (sync)
  addon/backup/model/model.py:216 (_syncSnapshots)
  addon/backup/ha/hasource.py:221 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:103 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:208 (_getHassioData)
  addon/backup/ha/harequests.py:175 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:941 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 09:11:29 INFO [backup.model.coordinator] I'll try again in an hour
07-06 09:12:31 INFO [backup.drive.drivesource] Saving new Google Drive credentials
07-06 09:12:31 DEBUG [backup.model.syncer] Sync requested by GoogleDrive
07-06 09:12:31 INFO [backup.model.coordinator] Syncing Snapshots
07-06 09:12:31 DEBUG [backup.ha.harequests] Making Hassio request: http://hassio/snapshots
07-06 09:12:31 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:148 (_sync)
  addon/backup/model/model.py:133 (sync)
  addon/backup/model/model.py:216 (_syncSnapshots)
  addon/backup/ha/hasource.py:221 (get)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:103 (snapshots)
  addon/backup/ha/harequests.py:26 (wrap_and_call)
  addon/backup/ha/harequests.py:208 (_getHassioData)
  addon/backup/ha/harequests.py:175 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:941 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://hassio/snapshots')

07-06 09:12:31 INFO [backup.model.coordinator] I'll try again in an hour
Supervisor Logs:
 22-07-06 09:05:08 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
22-07-06 09:05:09 WARNING (SyncWorker_3) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of ESPHome (dev)
22-07-06 09:05:09 WARNING (SyncWorker_3) [supervisor.store.data] Can't read /data/addons/git/15ef4d2f/template/config.yaml: Invalid Add-on config!. Got {'base': {'url': 'https://esphome.io/', 'webui': 'http://[HOST]:[PORT:6052]', 'startup': 'application', 'boot': 'auto', 'arch': ['amd64', 'armv7', 'aarch64'], 'hassio_api': True, 'auth_api': True, 'hassio_role': 'default', 'homeassistant_api': False, 'host_network': True, 'ingress': True, 'ingress_port': 0, 'panel_icon': 'mdi:chip', 'auto_uart': True, 'ports': {'6052/tcp': None}, 'ports_description': {'6052/tcp': 'Web interface (Not required for Home Assistant Ingress)'}, 'map': ['ssl:ro', 'c...
22-07-06 09:05:09 WARNING (SyncWorker_3) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of ESPHome
22-07-06 09:05:09 WARNING (SyncWorker_3) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of ESPHome (beta)
22-07-06 09:05:09 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of ESPHome (dev)
22-07-06 09:05:09 WARNING (SyncWorker_1) [supervisor.store.data] Can't read /data/addons/git/15ef4d2f/template/config.yaml: Invalid Add-on config!. Got {'base': {'url': 'https://esphome.io/', 'webui': 'http://[HOST]:[PORT:6052]', 'startup': 'application', 'boot': 'auto', 'arch': ['amd64', 'armv7', 'aarch64'], 'hassio_api': True, 'auth_api': True, 'hassio_role': 'default', 'homeassistant_api': False, 'host_network': True, 'ingress': True, 'ingress_port': 0, 'panel_icon': 'mdi:chip', 'auto_uart': True, 'ports': {'6052/tcp': None}, 'ports_description': {'6052/tcp': 'Web interface (Not required for Home Assistant Ingress)'}, 'map': ['ssl:ro', 'c...
22-07-06 09:05:09 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of ESPHome
22-07-06 09:05:09 WARNING (SyncWorker_1) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of ESPHome (beta)
22-07-06 09:05:09 INFO (MainThread) [supervisor.store] Loading add-ons from store: 71 all - 0 new - 0 remove
22-07-06 09:05:09 INFO (MainThread) [supervisor.store] Loading add-ons from store: 71 all - 0 new - 0 remove
22-07-06 09:05:30 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
22-07-06 09:08:03 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:08:03 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:08:53 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:05 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:05 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:05 INFO (MainThread) [supervisor.api.middleware.security] /snapshots/new/full access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:05 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:26 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:26 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:37 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:10:37 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
22-07-06 09:11:29 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 09:12:14 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
22-07-06 09:12:31 INFO (MainThread) [supervisor.api.middleware.security] /snapshots access from cebe7a76_hassio_google_drive_backup
22-07-06 09:13:11 INFO (MainThread) [supervisor.backups.manager] Found 3 backup files
22-07-06 09:13:11 INFO (MainThread) [supervisor.backups.manager] Found 3 backup files
22-07-06 09:13:56 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from cebe7a76_hassio_google_drive_backup
Home Assistant Core Logs:
 [13:05:00] INFO: Home Assistant Core service shutdown
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun home-assistant (no readiness notification)
s6-rc: info: service legacy-services successfully started
2022-07-06 09:05:06 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration mail_and_packages which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-06 09:05:06 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-06 09:05:06 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration tuya_v2 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-06 09:05:15 WARNING (MainThread) [homeassistant.components.mqtt.client] Can't decode payload b'{"name":"SW_HotWater ENERGY Factor","stat_t":"tele/tasmota_251A54/SENSOR","avty_t":"tele/tasmota_251A54/LWT","pl_avail":"Online","pl_not_avail":"Offline","uniq_id":"251A54_ENERGY_Factor","dev":{"ids":["251A54"]},"unit_of_meas":"Cos \xcf\x86","ic":"mdi:alpha-f-circle-outline","frc_upd":true,"val_tpl":"{{value_js1\xfd\x02\x001homeassistant/sensor/' on homeassistant/sensor/251A54_ENERGY_Factor/config with encoding utf-8 (for <Job HassJobType.Coroutinefunction <function async_start.<locals>.async_discovery_message_received at 0x7f06996d6160>>)
2022-07-06 09:05:16 ERROR (MainThread) [homeassistant.components.automation] Blueprint Aqara Magic Cube (Z2M) generated invalid automation with inputs OrderedDict([('rotate_cw_face_1', [OrderedDict([('service', 'script.louder_stereo')])]), ('remote', 'cube')]): Entity cube is neither a valid entity ID nor a valid UUID for dictionary value @ data['entity_id']. Got None
2022-07-06 09:05:21 ERROR (Thread-21) [plexapi] http://192.168.1.55:58860: HTTPConnectionPool(host='192.168.1.55', port=58860): Max retries exceeded with url: /resources (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f068ea51370>, 'Connection to 192.168.1.55 timed out. (connect timeout=3)'))
2022-07-06 09:05:21 ERROR (Thread-22) [plexapi] http://192.168.1.xx:58860: HTTPConnectionPool(host='192.168.1.xx', port=58860): Max retries exceeded with url: /resources (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f068ea616d0>, 'Connection to 192.168.1.xx timed out. (connect timeout=3)'))
2022-07-06 09:05:21 ERROR (SyncWorker_12) [homeassistant.components.plex.server] Resource connection failed to plex.tv: DESKTOP 2V5R0Q2
2022-07-06 09:05:26 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'OFFICE Sauna ON' trigger: In 'numeric_state' condition: unknown entity sensor.keith_s_button_temperature_measurement
2022-07-06 09:05:26 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Study HEATER Turn On' trigger: In 'numeric_state' condition: unknown entity sensor.amy_s_button_temperature_measurement
2022-07-06 09:05:26 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Study HEATER Auto Off' trigger: In 'numeric_state' condition: unknown entity sensor.amy_s_button_temperature_measurement
2022-07-06 09:06:00 WARNING (MainThread) [homeassistant.components.automation.hallway_lights_off_when_closet_closes] HALLWAY LIGHTS off when closet closes: Already running
SeByDocKy commented 2 years ago

Idem here ...

biejay commented 2 years ago

Same here

sabeechen commented 2 years ago

You need to update the addon, the version you're using is a few years old. The supervisor has been planning to make a change to their API that affects the addon for around 6 months now, and the latest version finally did it. This addon has been updated to handle this for a while now, you just need to update it.