sabeechen / hassio-google-drive-backup

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

Old Gdrive backups not deleted #1073

Open Paul-Vdp opened 2 months ago

Paul-Vdp commented 2 months ago
Description:
Since quite some time the older backups stored on my Gdrive are not being deleted anymore and keep on piling up - despite the logs showing the deletion action, and no error about it. Strangely enough, the Web UI only shows the backups according to the settings, and not the extra ones left sitting in the Gdrive ...
Whereas the local backup directory is being kept clean as per the settings.
I am not sure, but it could be that the problem started after I configured the addon to keep some generational backups, on top of the 'normal' daily ones.

Addon version: 0.112.1 Home Assistant Version: 2024.8.3 Supervisor Version: 2024.08.0 Supervisor Channel: beta Hassos Version: None Docker Version: 27.1.1 Architecture: amd64 Machine: qemux86-64 Date: 2024-08-26T12:34:12.574273+00:00 Timezone: Europe/Brussels Failure Time: 2024-08-08T22:43:16.863668+00:00 Last Good Sync: 2024-08-26T09:36:11.326227+00:00 Next Sync: 2024-08-26T13:54:19.024888+00:00 Next Backup: 2024-08-26T22:00:00+00:00 Next Cache Warm: 2024-08-26T13:42:53.831188+00:00 Time Offset: 0.0

Exception:
 No error could be identified automatically.

Backups:

 {
    "HomeAssistant": {
        "backups": 1,
        "retained": 0,
        "deletable": 1,
        "name": "HomeAssistant",
        "title": "Home Assistant",
        "latest": "2024-08-25T22:00:00Z",
        "max": 1,
        "enabled": true,
        "icon": "home-assistant",
        "ignored": 1,
        "detail": "",
        "size": "691.4 MB",
        "ignored_size": "20.4 MB",
        "free_space": "4.7 GB"
    },
    "GoogleDrive": {
        "backups": 6,
        "retained": 0,
        "deletable": 6,
        "name": "GoogleDrive",
        "title": "Google Drive",
        "latest": "2024-08-25T22:00:00Z",
        "max": 6,
        "enabled": true,
        "icon": "google-drive",
        "ignored": 0,
        "size": "4.0 GB",
        "ignored_size": "0.0 B",
        "free_space": "4.4 GB"
    }
}
Config:
 {
    "Setting.MAX_BACKUPS_IN_HA": 1,
    "Setting.MAX_BACKUPS_IN_GOOGLE_DRIVE": 6,
    "Setting.DAYS_BETWEEN_BACKUPS": 1.0,
    "Setting.IGNORE_OTHER_BACKUPS": true,
    "Setting.DELETE_IGNORED_AFTER_DAYS": 3.0,
    "Setting.BACKUP_NAME": "REDACTED",
    "Setting.BACKUP_TIME_OF_DAY": "00:00",
    "Setting.SPECIFY_BACKUP_FOLDER": true,
    "Setting.GENERATIONAL_DAYS": 3,
    "Setting.GENERATIONAL_WEEKS": 2,
    "Setting.GENERATIONAL_MONTHS": 1,
    "Setting.EXCLUDE_FOLDERS": "media,share,addons/local",
    "Setting.SEND_ERROR_REPORTS": true,
    "Setting.MAX_SYNC_INTERVAL_SECONDS": 21600.0,
    "Setting.HA_REPORTING_INTERVAL_SECONDS": 3600.0
}
Addon Logs:
 08-26 00:06:56 DEBUG [backup.drive.driverequests] Sending 10 MB to Google Drive
08-26 00:07:01 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 92.60%
08-26 00:07:01 DEBUG [backup.drive.driverequests] Sending 10 MB to Google Drive
08-26 00:07:05 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 94.04%
08-26 00:07:06 DEBUG [backup.drive.driverequests] Sending 10 MB to Google Drive
08-26 00:07:10 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 95.49%
08-26 00:07:10 DEBUG [backup.drive.driverequests] Sending 10 MB to Google Drive
08-26 00:07:15 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 96.94%
08-26 00:07:15 DEBUG [backup.drive.driverequests] Sending 10 MB to Google Drive
08-26 00:07:20 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 98.38%
08-26 00:07:20 DEBUG [backup.drive.driverequests] Sending 10 MB to Google Drive
08-26 00:07:25 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 99.83%
08-26 00:07:25 DEBUG [backup.drive.driverequests] Sending 1.17578125 MB to Google Drive
08-26 00:07:27 DEBUG [backup.drive.drivesource] Uploading Itegem 2024-08-26 00:00 100.00%
08-26 00:07:28 INFO [backup.drive.drivesource] Deleting 'Itegem 2024-08-12 00:00' From Google Drive
08-26 00:07:29 DEBUG [backup.watcher] Checking backup source for changes...
08-26 00:07:29 DEBUG [backup.model.syncer] Sync requested by Backup Directory Watcher
08-26 00:07:29 INFO [backup.model.coordinator] Syncing Backups
08-26 05:25:49 DEBUG [backup.model.destinationprecache] Preemptively retrieving and caching info from the backup destination to avoid peak demand
08-26 05:25:49 DEBUG [backup.drive.driverequests] Requesting refreshed Google Drive credentials
08-26 05:32:31 DEBUG [backup.model.syncer] Sync requested by Coordinator
08-26 05:32:31 INFO [backup.model.coordinator] Syncing Backups
08-26 11:16:52 DEBUG [backup.model.destinationprecache] Preemptively retrieving and caching info from the backup destination to avoid peak demand
08-26 11:16:52 DEBUG [backup.drive.driverequests] Requesting refreshed Google Drive credentials
08-26 11:23:18 DEBUG [backup.model.syncer] Sync requested by Coordinator
08-26 11:23:18 INFO [backup.model.coordinator] Syncing Backups
08-26 11:35:59 INFO [backup.watcher] A backup directory file was modified, we'll check for new backups soon.
08-26 11:36:11 DEBUG [backup.watcher] Checking backup source for changes...
08-26 11:36:11 DEBUG [backup.model.syncer] Sync requested by Backup Directory Watcher
08-26 11:36:11 INFO [backup.model.coordinator] Syncing Backups
Bjk8kds commented 2 months ago

I had the same problem, but with default settings, I didn't change the generational backup settings. EDIT: Nevermind, the problem I experienced was just a visual bug in my gdrive/browser, resolved after refreshing the page or opening it on another device.

dryii commented 1 month ago

~I had the same problem, but with default settings, I didn't change the generational backup settings.~ EDIT: Nevermind, the problem I experienced was just a visual bug in my gdrive/browser, resolved after refreshing the page or opening it on another device.

I, too, was in Google Drive today and noticed many months of backups. After reading your comment I refreshed the page and, TADA!, it looked normal with all the correct full backup files displayed.