sabeechen / hassio-google-drive-backup

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

issue where I erased the files in google drive directly in google drive and not into the addon. #1093

Open patrick-L91 opened 1 month ago

patrick-L91 commented 1 month ago
Description:

to reproduce.

install in home assistant OS the addon google drive backup. Make some backups , go to youtr google drive erase some backups files....

and try to do a backup after this. When the addon want to erase the older backup this crashes. And it become impossible to do another backup . the addon refusing to continue . reboot of pi , uninstalling no passing.

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.10.1 Supervisor Version: 2024.09.1 Supervisor Channel: stable Hassos Version: 13.1 Docker Version: 26.1.4 Architecture: aarch64 Machine: raspberrypi5-64 Date: 2024-10-05T20:22:52.885728+00:00 Timezone: Europe/Paris Failure Time: 2024-10-05T20:06:50.799325+00:00 Last Good Sync: 2024-10-05T20:06:50.151319+00:00 Next Sync: 2024-10-05T22:06:50.799325+00:00 Next Backup: 2024-10-08T18:59:38.241904+00:00 Next Cache Warm: 2024-10-05T22:01:48.789582+00:00 Time Offset: 0.0

Exception:

  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:250 (sync)
  addon/backup/drive/drivesource.py:197 (save)
  addon/backup/util/asynchttpgetter.py:228 (__aenter__)
  addon/backup/util/asynchttpgetter.py:61 (setup)
  addon/backup/util/asynchttpgetter.py:180 (_startReadRemoteAt)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://supervisor/backups/f608359a/download')

Backups:

 {
    "HomeAssistant": {
        "backups": 2,
        "retained": 0,
        "deletable": 2,
        "name": "HomeAssistant",
        "title": "Home Assistant",
        "latest": "2024-10-05T18:59:38Z",
        "max": 4,
        "enabled": true,
        "icon": "home-assistant",
        "ignored": 2,
        "detail": "",
        "size": "20.8 MB",
        "ignored_size": "317.4 kB",
        "free_space": "102.3 GB"
    },
    "GoogleDrive": {
        "backups": 1,
        "retained": 0,
        "deletable": 1,
        "name": "GoogleDrive",
        "title": "Google Drive",
        "latest": "2024-10-05T18:59:38Z",
        "max": 4,
        "enabled": true,
        "icon": "google-drive",
        "ignored": 0,
        "detail": "patrickl91essonne@gmail.com",
        "size": "20.8 MB",
        "ignored_size": "0.0 B",
        "free_space": "13.4 GB"
    }
}
Config:
 {
    "Setting.SEND_ERROR_REPORTS": true
}
Addon Logs:
 10-05 21:14:59 INFO [backup.ui.uiserver] Starting server on port 8099
10-05 21:14:59 INFO [backup.ui.uiserver] Server started
10-05 21:14:59 DEBUG [backup.model.syncer] Sync requested by Coordinator
10-05 21:14:59 INFO [backup.model.coordinator] Syncing Backups
10-05 22:04:27 INFO [backup.drive.drivesource] Saving new Google Drive credentials
10-05 22:04:27 DEBUG [backup.model.syncer] Sync requested by GoogleDrive
10-05 22:04:27 INFO [backup.model.coordinator] Syncing Backups
10-05 22:04:28 INFO [backup.drive.folderfinder] Found Home Assistant Backups
10-05 22:04:28 ERROR [backup.model.coordinator] A backup folder already exists.  Please visit the add-on Web UI to select where to backup.
10-05 22:04:28 INFO [backup.model.coordinator] I'll try again in 2 hours
10-05 22:06:15 INFO [backup.model.coordinator] Syncing Backups
10-05 22:06:15 INFO [backup.drive.folderfinder] Saving backup folder: 17zyPSAdxB8ZcG5C6ae2moHGBMsVtWX6E
10-05 22:06:16 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:250 (sync)
  addon/backup/drive/drivesource.py:197 (save)
  addon/backup/util/asynchttpgetter.py:228 (__aenter__)
  addon/backup/util/asynchttpgetter.py:61 (setup)
  addon/backup/util/asynchttpgetter.py:180 (_startReadRemoteAt)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://supervisor/backups/f608359a/download')

10-05 22:06:16 INFO [backup.model.coordinator] I'll try again in 2 hours
10-05 22:06:49 INFO [backup.debugworker] Sending error report (see settings to disable)
10-05 22:06:50 DEBUG [backup.model.syncer] Sync requested by UI Server
10-05 22:06:50 INFO [backup.model.coordinator] Syncing Backups
10-05 22:06:50 ERROR [backup.model.coordinator] 
  addon/backup/model/coordinator.py:198 (_sync)
  addon/backup/model/model.py:250 (sync)
  addon/backup/drive/drivesource.py:197 (save)
  addon/backup/util/asynchttpgetter.py:228 (__aenter__)
  addon/backup/util/asynchttpgetter.py:61 (setup)
  addon/backup/util/asynchttpgetter.py:180 (_startReadRemoteAt)
  /site-packages/aiohttp/client_reqrep.py:1059 (raise_for_status)
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://supervisor/backups/f608359a/download')

10-05 22:06:50 INFO [backup.model.coordinator] I'll try again in 2 hours
Supervisor Logs:
 2024-10-05 21:30:06.443 INFO (MainThread) [supervisor.resolution.checks.base] Run check for security/core
2024-10-05 21:30:06.443 INFO (MainThread) [supervisor.resolution.checks.base] Run check for dns_server_failed/dns_server
2024-10-05 21:30:06.443 INFO (MainThread) [supervisor.resolution.checks.base] Run check for disabled_data_disk/system
2024-10-05 21:30:06.443 INFO (MainThread) [supervisor.resolution.checks.base] Run check for pwned/addon
2024-10-05 21:30:06.444 INFO (MainThread) [supervisor.resolution.checks.base] Run check for free_space/system
2024-10-05 21:30:06.444 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor
2024-10-05 21:30:06.450 INFO (MainThread) [supervisor.resolution.checks.base] Run check for multiple_data_disks/system
2024-10-05 21:30:06.451 INFO (MainThread) [supervisor.resolution.check] System checks complete
2024-10-05 21:30:06.451 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-10-05 21:30:06.521 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-10-05 21:30:06.522 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-10-05 21:30:06.522 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-10-05 21:30:21.032 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from a0d7b954_ssh
2024-10-05 21:30:21.034 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from a0d7b954_ssh
2024-10-05 21:30:21.036 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from a0d7b954_ssh
2024-10-05 21:30:21.038 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from a0d7b954_ssh
2024-10-05 21:32:10.132 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-10-05 22:02:10.380 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-10-05 22:04:27.708 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:04:27.712 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:15.904 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:15.909 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:16.556 INFO (MainThread) [supervisor.api.middleware.security] /backups/f608359a/download access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:16.556 INFO (MainThread) [supervisor.api.backups] Downloading backup f608359a
2024-10-05 22:06:50.152 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/info access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:50.156 INFO (MainThread) [supervisor.api.middleware.security] /backups access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:50.795 INFO (MainThread) [supervisor.api.middleware.security] /backups/f608359a/download access from cebe7a76_hassio_google_drive_backup
2024-10-05 22:06:50.795 INFO (MainThread) [supervisor.api.backups] Downloading backup f608359a
2024-10-05 22:22:52.887 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from cebe7a76_hassio_google_drive_backup
Home Assistant Core Logs:
 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
2024-10-05 20:30:01.689 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration clean_up_snapshots_service 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
2024-10-05 20:30:01.690 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
2024-10-05 20:30:01.690 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration scheduler 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
s6-rc: info: service legacy-services: stopping
[18:50:03] INFO: Home Assistant Core finish process exit code 0
[18:50:03] 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
2024-10-05 20:50:08.679 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration clean_up_snapshots_service 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
2024-10-05 20:50:08.680 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
2024-10-05 20:50:08.681 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration scheduler 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