sabeechen / hassio-google-drive-backup

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

Couldn't delete old backups in Home AssistantPlease add a title #1002

Closed andreasbuff closed 8 months ago

andreasbuff commented 8 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: 2024.3.1 Supervisor Version: 2024.03.1 Supervisor Channel: beta Hassos Version: 12.1 Docker Version: 24.0.7 Architecture: amd64 Machine: generic-x86-64 Date: 2024-03-22T18:32:33.910623+00:00 Timezone: Europe/Berlin Failure Time: 2024-03-22T18:32:29.369017+00:00 Last Good Sync: 2024-03-22T18:32:28.729427+00:00 Next Sync: 2024-03-22T20:32:29.369017+00:00 Next Backup: 2024-03-23T03:00:00+00:00 Next Cache Warm: 2024-03-22T20:19:03.420714+00:00 Time Offset: 0.0

Exception:

  addon/backup/ha/harequests.py:105 (delete)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:280 (_sendHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('http://supervisor/backups/d9321cdd')
Whose handling caused:
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:222 (sync)
  addon/backup/model/model.py:280 (deleteBackup)
  addon/backup/ha/hasource.py:355 (delete)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:111 (delete)
backup.exceptions.exceptions.HomeAssistantDeleteError

Backups:

 {
    "HomeAssistant": {
        "backups": 6,
        "retained": 6,
        "deletable": 0,
        "name": "HomeAssistant",
        "title": "Home Assistant",
        "latest": "2024-02-03T03:00:01Z",
        "max": 7,
        "enabled": true,
        "icon": "home-assistant",
        "ignored": 2,
        "detail": "",
        "size": "4.1 GB",
        "ignored_size": "0.0 B"
    },
    "GoogleDrive": {
        "backups": 15,
        "retained": 2,
        "deletable": 13,
        "name": "GoogleDrive",
        "title": "Google Drive",
        "latest": "2024-03-22T03:00:01Z",
        "max": 14,
        "enabled": true,
        "icon": "google-drive",
        "ignored": 0,
        "detail": "andreas.buff@gmail.com",
        "size": "18.1 GB",
        "ignored_size": "0.0 B",
        "free_space": "1.0 TB"
    }
}
Config:
 {
    "Setting.MAX_BACKUPS_IN_HA": 7,
    "Setting.MAX_BACKUPS_IN_GOOGLE_DRIVE": 14,
    "Setting.DAYS_BETWEEN_BACKUPS": 1.0,
    "Setting.DELETE_IGNORED_AFTER_DAYS": 1.0,
    "Setting.DELETE_BEFORE_NEW_BACKUP": true,
    "Setting.BACKUP_TIME_OF_DAY": "04:00",
    "Setting.SPECIFY_BACKUP_FOLDER": true,
    "Setting.BACKUP_STORAGE": "Synology_HA_Backup",
    "Setting.DELETE_AFTER_UPLOAD": true,
    "Setting.GENERATIONAL_DAYS": 7,
    "Setting.GENERATIONAL_WEEKS": 4,
    "Setting.GENERATIONAL_MONTHS": 12,
    "Setting.GENERATIONAL_YEARS": 5,
    "Setting.EXCLUDE_FOLDERS": "media,share",
    "Setting.EXCLUDE_ADDONS": "core_samba"
}
Addon Logs:
 03-22 19:30:22 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:30:22 ERROR [backup.model.coordinator] Home Assistant refused to delete the backup.
03-22 19:30:22 INFO [backup.model.coordinator] I'll try again in 2 hours
03-22 19:30:23 INFO [backup.model.coordinator] Syncing Backups
03-22 19:30:24 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:30:24 ERROR [backup.model.coordinator] Home Assistant refused to delete the backup.
03-22 19:30:24 INFO [backup.model.coordinator] I'll try again in 2 hours
03-22 19:31:39 INFO [backup.model.coordinator] Syncing Backups
03-22 19:31:39 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:31:39 ERROR [backup.model.coordinator] Home Assistant refused to delete the backup.
03-22 19:31:39 INFO [backup.model.coordinator] I'll try again in 2 hours
03-22 19:31:43 INFO [backup.model.coordinator] Syncing Backups
03-22 19:31:44 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:31:44 ERROR [backup.model.coordinator] Home Assistant refused to delete the backup.
03-22 19:31:44 INFO [backup.model.coordinator] I'll try again in 2 hours
03-22 19:31:53 INFO [backup.drive.drivesource] Deleting 'Partial Backup 2024-03-20 04:00:00' From Google Drive
03-22 19:31:56 INFO [backup.model.coordinator] Syncing Backups
03-22 19:31:57 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:31:57 ERROR [backup.model.coordinator] Home Assistant refused to delete the backup.
03-22 19:31:57 INFO [backup.model.coordinator] I'll try again in 2 hours
03-22 19:32:13 INFO [backup.ha.hasource] Deleting 'core_2024.3.1' from Home Assistant
03-22 19:32:13 ERROR [backup.ui.uiserver] Error serving POST http://192.168.0.153:8123/deleteSnapshot
03-22 19:32:13 ERROR [backup.ui.uiserver] 
  addon/backup/ha/harequests.py:105 (delete)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:280 (_sendHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('http://supervisor/backups/13166259')
Whose handling caused:
  addon/backup/ui/uiserver.py:801 (error_middleware)
  addon/backup/ui/uiserver.py:305 (deleteSnapshot)
  addon/backup/model/coordinator.py:295 (delete)
  addon/backup/model/coordinator.py:353 (_withSoftLock)
  addon/backup/model/coordinator.py:304 (_delete)
  addon/backup/ha/hasource.py:355 (delete)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:111 (delete)
backup.exceptions.exceptions.HomeAssistantDeleteError

03-22 19:32:18 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:32:18 ERROR [backup.ui.uiserver] Error serving POST http://192.168.0.153:8123/deleteSnapshot
03-22 19:32:18 ERROR [backup.ui.uiserver] 
  addon/backup/ha/harequests.py:105 (delete)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:280 (_sendHassioData)
  addon/backup/ha/harequests.py:225 (_validateHassioReply)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('http://supervisor/backups/d9321cdd')
Whose handling caused:
  addon/backup/ui/uiserver.py:801 (error_middleware)
  addon/backup/ui/uiserver.py:305 (deleteSnapshot)
  addon/backup/model/coordinator.py:295 (delete)
  addon/backup/model/coordinator.py:353 (_withSoftLock)
  addon/backup/model/coordinator.py:304 (_delete)
  addon/backup/ha/hasource.py:355 (delete)
  addon/backup/ha/harequests.py:34 (wrap_and_call)
  addon/backup/ha/harequests.py:111 (delete)
backup.exceptions.exceptions.HomeAssistantDeleteError

03-22 19:32:28 INFO [backup.model.coordinator] Syncing Backups
03-22 19:32:29 INFO [backup.ha.hasource] Deleting 'addon_core_duckdns_1.15.0' from Home Assistant
03-22 19:32:29 ERROR [backup.model.coordinator] Home Assistant refused to delete the backup.
03-22 19:32:29 INFO [backup.model.coordinator] I'll try again in 2 hours
Supervisor Logs:
 2024-03-22 19:31:25.511 INFO (MainThread) [supervisor.hardware.monitor] Detecting remove hardware /dev/bus/usb/001/048 - None
2024-03-22 19:31:27.976 INFO (MainThread) [supervisor.hardware.monitor] Detecting add hardware /dev/bus/usb/001/049 - None
2024-03-22 19:31:27.998 INFO (MainThread) [supervisor.hardware.monitor] Detecting add hardware /dev/ttyACM0 - /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2679931-if00
2024-03-22 19:31:39.186 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:39.190 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:39.194 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:39.774 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:39.775 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup d9321cdd: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/d9321cdd.tar'
2024-03-22 19:31:43.762 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:43.766 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:43.770 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:44.320 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:44.321 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup d9321cdd: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/d9321cdd.tar'
2024-03-22 19:31:56.608 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:56.612 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:56.617 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:57.206 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:31:57.207 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup d9321cdd: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/d9321cdd.tar'
2024-03-22 19:32:13.218 INFO (MainThread) [supervisor.api.middleware.security] /backups/13166259 access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:13.219 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup 13166259: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/13166259.tar'
2024-03-22 19:32:18.510 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:18.511 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup d9321cdd: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/d9321cdd.tar'
2024-03-22 19:32:28.731 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:28.734 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:28.736 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:28.739 INFO (MainThread) [supervisor.api.middleware.security] /backups/13166259/info access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:29.366 INFO (MainThread) [supervisor.api.middleware.security] /backups/d9321cdd access from cebe7a76_hassio_google_drive_backup
2024-03-22 19:32:29.367 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup d9321cdd: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/d9321cdd.tar'
2024-03-22 19:32:33.929 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from cebe7a76_hassio_google_drive_backup
Home Assistant Core Logs:
 2024-03-22 19:31:34.662 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for tag-reader-garage @ 192.168.2.141: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.141', port=6053))]: [Errno 113] Connect call failed ('192.168.2.141', 6053) (SocketAPIError)
2024-03-22 19:31:34.663 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for temp-kuehlschrank-terrasse @ 192.168.1.102: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.102', port=6053))]: [Errno 113] Connect call failed ('192.168.1.102', 6053) (SocketAPIError)
2024-03-22 19:31:34.663 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for voltsensor-rangerover @ 192.168.2.200: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.200', port=6053))]: [Errno 113] Connect call failed ('192.168.2.200', 6053) (SocketAPIError)
2024-03-22 19:31:34.672 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for 192.168.1.108: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.108', port=6053))]: [Errno 113] Connect call failed ('192.168.1.108', 6053) (SocketAPIError)
2024-03-22 19:31:34.742 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for gps2-mueltonne @ 192.168.1.254: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.254', port=6053))]: [Errno 113] Connect call failed ('192.168.1.254', 6053) (SocketAPIError)
2024-03-22 19:31:34.743 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for voltsensor-discovery @ 192.168.1.124: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.1.124', port=6053))]: [Errno 113] Connect call failed ('192.168.1.124', 6053) (SocketAPIError)
2024-03-22 19:31:35.056 ERROR (MainThread) [homeassistant.components.update] Platform esphome does not generate unique IDs. ID 48:55:19:12:7B:D0 already exists - ignoring update.vindriktning_wozi_firmware
2024-03-22 19:31:35.993 ERROR (MainThread) [homeassistant.components.update] Platform esphome does not generate unique IDs. ID 4C:75:25:0C:05:48 already exists - ignoring update.water_sensor_heizung_firmware
2024-03-22 19:31:36.146 ERROR (MainThread) [homeassistant.components.update] Platform esphome does not generate unique IDs. ID AC:0B:FB:DB:6D:A0 already exists - ignoring update.briefkasten_firmware
2024-03-22 19:31:39.152 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for m5-accelerometer-werkstatt @ 192.168.2.138: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.138', port=6053))]: [Errno 113] Connect call failed ('192.168.2.138', 6053) (SocketAPIError)
2024-03-22 19:31:39.222 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp-web-tools-example-cfc82c @ 192.168.2.220: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.220', port=6053))]: [Errno 113] Connect call failed ('192.168.2.220', 6053) (SocketAPIError)
2024-03-22 19:31:41.447 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Taster Grill  (single) Start Timer' failed to setup triggers and has been disabled: Unknown device '6c3c31b4909b25c3eb764354401ab797'
2024-03-22 19:31:41.568 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Switch Feller Duo 1 (1ste kurz) WoZi' failed to setup triggers and has been disabled: Unknown device 'f22a3af6ca4ed67176f3ae44ac8d0487'
2024-03-22 19:31:41.568 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Feller Duo 1 (2te kurz) Esszimmer' failed to setup triggers and has been disabled: Unknown device 'f22a3af6ca4ed67176f3ae44ac8d0487'
2024-03-22 19:31:41.568 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Feller Duo 1 (3te kurz) Küche' failed to setup triggers and has been disabled: Unknown device 'f22a3af6ca4ed67176f3ae44ac8d0487'
2024-03-22 19:31:41.569 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Feller Duo 1 (4te kurz) Treppenhaus' failed to setup triggers and has been disabled: Unknown device 'f22a3af6ca4ed67176f3ae44ac8d0487'
2024-03-22 19:31:41.650 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Door Tumbler (Reset Counter, new)' failed to setup triggers and has been disabled: Unknown device '220db3730c1b159390c624718288df36'
2024-03-22 19:31:41.842 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Drehknopf (single) Werkstatt' failed to setup triggers and has been disabled: Unknown device 'f9483df07087c694cbc2393f657e91b5'
2024-03-22 19:31:41.849 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Deaktiviere Alarmo, when SwitchBotDoorLock is open' failed to setup actions and has been disabled: Unknown device '4bf73cde4cb66f2377af86c5c6217db9'
2024-03-22 19:31:42.167 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Haustüre automatisch schliessen wenn Abstand über 50m  ' failed to setup triggers and has been disabled: Unknown device 'fb87a87c32f08356608cc1e21b078d18'
2024-03-22 19:31:42.357 WARNING (MainThread) [custom_components.sonos_cloud] Application Credentials have been imported and can be removed from configuration.yaml
2024-03-22 19:31:42.687 WARNING (MainThread) [homeassistant.components.media_player] Updating dlna_dmr media_player took longer than the scheduled update interval 0:00:10
2024-03-22 19:31:42.688 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.192_168_1_125_sonos_one is taking over 10 seconds
2024-03-22 19:31:54.822 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esphome-web-f51718 @ 192.168.2.215: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.215', port=6053))]: [Errno 113] Connect call failed ('192.168.2.215', 6053) (SocketAPIError)
2024-03-22 19:32:11.223 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp-water-sensor-5 @ 192.168.2.107: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.107', port=6053))]: [Errno 113] Connect call failed ('192.168.2.107', 6053) (SocketAPIError)
2024-03-22 19:32:11.224 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for voltsensor-gs @ 192.168.2.109: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address='192.168.2.109', port=6053))]: [Errno 113] Connect call failed ('192.168.2.109', 6053) (SocketAPIError)
2024-03-22 19:32:14.371 WARNING (MainThread) [homeassistant.components.apple_tv] Connection lost to Apple TV "APPLE Chill-out"
2024-03-22 19:32:21.774 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.spotify_buff_andreas is taking over 10 seconds
2024-03-22 19:32:22.207 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: onvif
sabeechen commented 8 months ago

The problem is here in your supervisor logs:

[31m2024-03-22 19:32:29.367 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup d9321cdd: [Errno 2] No such file or directory: '/data/mounts/Synology_HA_Backup/d9321cdd.tar'

Something is wrong with your network mount. You'll need to fix that or configure HA to store its backups on local disk.