sabeechen / hassio-google-drive-backup

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

Cannot delete old backups manually #1091

Open responde opened 1 month ago

responde commented 1 month ago
Description:
Cannot delete old backups manually. tested with the partials from when an integration is updated

Addon version: 0.112.1 Home Assistant Version: 2024.10.0 Supervisor Version: 2024.09.1 Supervisor Channel: stable Hassos Version: 13.1 Docker Version: 26.1.4 Architecture: amd64 Machine: qemux86-64 Date: 2024-10-03T18:43:19.101775+00:00 Timezone: Europe/Madrid Failure Time: 2024-09-21T08:20:49.220974+00:00 Last Good Sync: 2024-10-03T17:52:00.292694+00:00 Next Sync: 2024-10-03T19:39:33.572006+00:00 Next Backup: 2024-10-05T23:45:28.574618+00:00 Next Cache Warm: 2261-04-12T08:19:31.220475+00:00 Time Offset: 0.0

Exception:
 No error could be identified automatically.

Backups:

 {
    "HomeAssistant": {
        "backups": 3,
        "retained": 0,
        "deletable": 3,
        "name": "HomeAssistant",
        "title": "Home Assistant",
        "latest": "2024-10-02T23:45:28Z",
        "max": 3,
        "enabled": true,
        "icon": "home-assistant",
        "ignored": 13,
        "detail": "",
        "size": "2.4 GB",
        "ignored_size": "202.8 MB",
        "free_space": "27.9 GB"
    },
    "GoogleDrive": {
        "backups": 3,
        "retained": 0,
        "deletable": 3,
        "name": "GoogleDrive",
        "title": "Google Drive",
        "latest": "2024-10-02T23:45:28Z",
        "max": 3,
        "enabled": true,
        "icon": "google-drive",
        "ignored": 0,
        "detail": "xxxxxxxx@gmail.com",
        "size": "2.4 GB",
        "ignored_size": "0.0 B",
        "free_space": "11.1 GB"
    }
}
Config:
 {
    "Setting.MAX_BACKUPS_IN_HA": 3,
    "Setting.MAX_BACKUPS_IN_GOOGLE_DRIVE": 3,
    "Setting.DELETE_IGNORED_AFTER_DAYS": 6.0
}
Addon Logs:
 10-03 18:31:16 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/567306ae')
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

10-03 18:31:27 INFO [backup.ha.hasource] Deleting 'addon_a0d7b954_chrony_4.0.0' from Home Assistant
10-03 18:31:27 ERROR [backup.ui.uiserver] Error serving POST http://192.168.4.40:8123/deleteSnapshot
10-03 18:31:27 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/1263fd8f')
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
Supervisor Logs:
 2024-10-03 19:52:34.542 INFO (MainThread) [supervisor.store] Loading add-ons from store: 100 all - 0 new - 0 remove
2024-10-03 19:54:58.230 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-10-03 19:56:21.605 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-10-03 19:56:21.606 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-10-03 19:56:21.606 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-10-03 19:56:21.611 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-10-03 19:56:21.612 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-10-03 19:57:21.154 INFO (MainThread) [supervisor.host.info] Updating local host information
2024-10-03 19:57:21.598 INFO (MainThread) [supervisor.host.services] Updating service information
2024-10-03 19:57:21.605 INFO (MainThread) [supervisor.host.network] Updating local network information
2024-10-03 19:57:21.721 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
2024-10-03 19:57:21.727 INFO (MainThread) [supervisor.host.manager] Host information reload completed
2024-10-03 19:57:36.722 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-10-03 19:58:51.804 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_ipv6_error/dns_server
2024-10-03 20:00:06.889 INFO (MainThread) [supervisor.resolution.checks.base] Run check for docker_config/system
2024-10-03 20:00:06.889 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-10-03 20:00:07.263 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-10-03 20:00:07.263 INFO (MainThread) [supervisor.resolution.checks.base] Run check for ipv4_connection_problem/system
2024-10-03 20:00:07.263 INFO (MainThread) [supervisor.resolution.checks.base] Run check for no_current_backup/system
2024-10-03 20:00:07.264 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-10-03 20:00:07.264 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-10-03 20:00:07.379 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-10-03 20:00:07.380 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-10-03 20:00:07.380 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-10-03 20:18:51.710 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
2024-10-03 20:24:58.357 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-10-03 20:43:01.178 INFO (MainThread) [supervisor.api.middleware.security] /backups/567306ae access from cebe7a76_hassio_google_drive_backup
2024-10-03 20:43:01.179 ERROR (MainThread) [supervisor.backups.manager] Can't remove backup 567306ae: [Errno 2] No such file or directory: '/data/backup/addon_a0d7b954_vscode_5-16-0.tar'
2024-10-03 20:43:19.113 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from cebe7a76_hassio_google_drive_backup
Home Assistant Core Logs:
not significant