sabeechen / hassio-google-drive-backup

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

HA Bacup utility error #966

Closed freddiemare closed 10 months ago

freddiemare commented 10 months ago
Description:
If you have anything else that could help explain what happened, click "Markdown" above and write it here.

Addon version: 0.112.1 Home Assistant Version: 2023.12.4 Supervisor Version: 2023.12.0 Supervisor Channel: stable Hassos Version: 11.2 Docker Version: 24.0.7 Architecture: amd64 Machine: qemux86-64 Date: 2024-01-05T02:13:23.334743+00:00 Timezone: Africa/Johannesburg Failure Time: 2024-01-05T02:09:17.582237+00:00 Last Good Sync: 2024-01-05T02:09:07.184553+00:00 Next Sync: 2024-01-05T04:09:17.582237+00:00 Next Backup: 2024-01-04T23:00:00+00:00 Next Cache Warm: 2260-07-05T06:21:02.100538+00:00 Time Offset: 0.0

Exception:

  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

Backups:

 {
    "HomeAssistant": {
        "backups": 6,
        "retained": 3,
        "deletable": 3,
        "name": "HomeAssistant",
        "title": "Home Assistant",
        "latest": "2024-01-03T20:42:23Z",
        "max": 3,
        "enabled": true,
        "icon": "home-assistant",
        "ignored": 0,
        "detail": "",
        "size": "13.5 GB",
        "ignored_size": "0.0 B"
    },
    "GoogleDrive": {
        "backups": 4,
        "retained": 2,
        "deletable": 2,
        "name": "GoogleDrive",
        "title": "Google Drive",
        "latest": "2024-01-03T20:42:23Z",
        "max": 2,
        "enabled": true,
        "icon": "google-drive",
        "ignored": 0,
        "detail": "freddie.j.mare@gmail.com",
        "size": "11.1 GB",
        "ignored_size": "0.0 B",
        "free_space": "1.9 TB"
    }
}
Config:
 {
    "Setting.MAX_BACKUPS_IN_HA": 3,
    "Setting.MAX_BACKUPS_IN_GOOGLE_DRIVE": 2,
    "Setting.DAYS_BETWEEN_BACKUPS": 2.0,
    "Setting.IGNORE_UPGRADE_BACKUPS": false,
    "Setting.BACKUP_TIME_OF_DAY": "01:00",
    "Setting.BACKUP_PASSWORD": "REDACTED",
    "Setting.BACKUP_STORAGE": "Backup",
    "Setting.SEND_ERROR_REPORTS": true
}
Addon Logs:
 01-05 01:03:25 INFO [backup.model.coordinator] Syncing Backups
01-05 01:03:36 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 01:03:36 INFO [backup.model.coordinator] I'll try again in 2 minutes, 40 seconds
01-05 01:06:16 DEBUG [backup.model.syncer] Sync requested by Coordinator
01-05 01:06:16 INFO [backup.model.coordinator] Syncing Backups
01-05 01:06:26 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 01:06:26 INFO [backup.model.coordinator] I'll try again in 5 minutes, 20 seconds
01-05 01:11:47 DEBUG [backup.model.syncer] Sync requested by Coordinator
01-05 01:11:47 INFO [backup.model.coordinator] Syncing Backups
01-05 01:11:59 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 01:11:59 INFO [backup.model.coordinator] I'll try again in 10 minutes, 40 seconds
01-05 01:22:39 DEBUG [backup.model.syncer] Sync requested by Coordinator
01-05 01:22:39 INFO [backup.model.coordinator] Syncing Backups
01-05 01:22:52 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 01:22:52 INFO [backup.model.coordinator] I'll try again in 21 minutes, 20 seconds
01-05 01:44:12 DEBUG [backup.model.syncer] Sync requested by Coordinator
01-05 01:44:12 INFO [backup.model.coordinator] Syncing Backups
01-05 01:44:22 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 01:44:22 INFO [backup.model.coordinator] I'll try again in 42 minutes, 40 seconds
01-05 02:27:02 DEBUG [backup.model.syncer] Sync requested by Coordinator
01-05 02:27:02 INFO [backup.model.coordinator] Syncing Backups
01-05 02:27:13 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 02:27:13 INFO [backup.model.coordinator] I'll try again in 1 hours, 25 minutes, 20 seconds
01-05 03:52:33 DEBUG [backup.model.syncer] Sync requested by Coordinator
01-05 03:52:33 INFO [backup.model.coordinator] Syncing Backups
01-05 03:52:45 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 03:52:45 INFO [backup.model.coordinator] I'll try again in 2 hours
01-05 04:09:07 INFO [backup.model.coordinator] Syncing Backups
01-05 04:09:17 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:203 (sync)
  addon/backup/model/model.py:316 (_syncBackups)
  addon/backup/ha/hasource.py:280 (get)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:135 (backups)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:269 (_getHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('http://supervisor/backups')

01-05 04:09:17 INFO [backup.model.coordinator] I'll try again in 2 hours
Supervisor Logs:
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
    answer = await method(api, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/backups.py", line 127, in list
    data_backups = self._list_backups()
                   ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/api/backups.py", line 105, in _list_backups
    return [
           ^
  File "/usr/src/supervisor/supervisor/api/backups.py", line 111, in <listcomp>
    ATTR_SIZE: backup.size,
               ^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/backups/backup.py", line 174, in size
    if not self.tarfile.is_file():
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/pathlib.py", line 1267, in is_file
    return S_ISREG(self.stat().st_mode)
                   ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/pathlib.py", line 1013, in stat
    return os.stat(self, follow_symlinks=follow_symlinks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 112] Host is down: '/data/mounts/SVR001/437ef5b6.tar'
24-01-05 04:09:38 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from f0e7e328_hassio_google_drive_backup
24-01-05 04:09:38 INFO (MainThread) [supervisor.api.middleware.security] /core/logs access from f0e7e328_hassio_google_drive_backup
24-01-05 04:10:04 WARNING (MainThread) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered)
24-01-05 04:10:04 WARNING (MainThread) [supervisor.addons.options] Option 'port' does not exist in the schema for Node-RED (a0d7b954_nodered)
24-01-05 04:10:04 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered)
24-01-05 04:13:23 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from f0e7e328_hassio_google_drive_backup
Home Assistant Core Logs:
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1748, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 370, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 84, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed
2024-01-05 04:09:02.469 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not determine the power state of the Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] due to timeout after 5 seconds
2024-01-05 04:09:03.113 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not cycle the Bluetooth adapter hci0 [5C:51:4F:A3:A2:95]: [Errno 38] Function not implemented
2024-01-05 04:09:03.115 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth management socket connection lost: [Errno 22] Invalid argument
2024-01-05 04:09:08.115 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] could not be reset: 
2024-01-05 04:09:10.716 WARNING (MainThread) [bluetooth_auto_recovery.recover] Closing Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] failed: [Errno 9] Bad file descriptor
2024-01-05 04:10:43.825 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not determine the power state of the Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] due to timeout after 5 seconds
2024-01-05 04:10:44.496 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not cycle the Bluetooth adapter hci0 [5C:51:4F:A3:A2:95]: [Errno 38] Function not implemented
2024-01-05 04:10:44.498 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth management socket connection lost: [Errno 22] Invalid argument
2024-01-05 04:10:49.498 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] could not be reset: 
2024-01-05 04:10:52.076 WARNING (MainThread) [bluetooth_auto_recovery.recover] Closing Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] failed: [Errno 9] Bad file descriptor
2024-01-05 04:12:23.388 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from reverse.rain.network (197.184.179.20). Requested URL: '/api/webrtc/ws?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIzNDQ0NDljMmMyYzE0OWI0OTA0MGQwNjE0NmZjNDcyOCIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTcwNDQyMDIwNSwiZXhwIjoxNzA0NDIwMjM1fQ.8H498z_9rG2yom_hO4QHBsQvBDTfaxSB9UpliOL3X0I&poster=%2Flocal%2FGatePlot35_s.png'. (Mozilla/5.0 (Linux; Android 14; SM-G998B Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/120.0.6099.144 Mobile Safari/537.36)
2024-01-05 04:12:23.434 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from reverse.rain.network (197.184.179.20). Requested URL: '/api/webrtc/ws?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIzNDQ0NDljMmMyYzE0OWI0OTA0MGQwNjE0NmZjNDcyOCIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTcwNDQyMDIxMCwiZXhwIjoxNzA0NDIwMjQwfQ.f1JEogKrfe-slf2nAuXI0rqaD6rmt1nJpFplBvvcsAE&poster=%2Flocal%2FGatePlot35_s.png'. (Mozilla/5.0 (Linux; Android 14; SM-G998B Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/120.0.6099.144 Mobile Safari/537.36)
2024-01-05 04:12:23.445 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from reverse.rain.network (197.184.179.20). Requested URL: '/api/webrtc/ws?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIzNDQ0NDljMmMyYzE0OWI0OTA0MGQwNjE0NmZjNDcyOCIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTcwNDQyMDEzNiwiZXhwIjoxNzA0NDIwMTY2fQ.F0v0m-3kGlhtN4FZAuDO2sWOHdR-4ZEnCLkb18uZQRE&poster=%2Flocal%2FGatePlot35_s.png'. (Mozilla/5.0 (Linux; Android 14; SM-G998B Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/120.0.6099.144 Mobile Safari/537.36)
2024-01-05 04:12:25.418 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not determine the power state of the Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] due to timeout after 5 seconds
2024-01-05 04:12:26.835 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not cycle the Bluetooth adapter hci0 [5C:51:4F:A3:A2:95]: [Errno 38] Function not implemented
2024-01-05 04:12:26.836 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth management socket connection lost: [Errno 22] Invalid argument
2024-01-05 04:12:31.837 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] could not be reset: 
2024-01-05 04:12:33.809 WARNING (MainThread) [bluetooth_auto_recovery.recover] Closing Bluetooth adapter hci0 [5C:51:4F:A3:A2:95] failed: [Errno 9] Bad file descriptor
sabeechen commented 10 months ago

From your supervisor logs:

OSError: [Errno 112] Host is down: '/data/mounts/SVR001/437ef5b6.tar'

Your network mount is down, or at least HA is unable to access it. You'll need to get it working or switch to storing backups on your HA host instead.