sabeechen / hassio-google-drive-backup

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

Backups can't be completed #1047

Open metawops opened 1 month ago

metawops commented 1 month ago

Hi Stephen,

I see a lot of folks adding issues here saying that their backups to GoogleDrive can't be completed. I won't repeat huge log files here but just wanted to add me to the list of these people, unfortunately.

Here's a short excerpt from, the plugin's log:

05-24 05:25:34 DEBUG [backup.model.syncer] Sync requested by Coordinator
05-24 05:25:34 INFO [backup.model.coordinator] Syncing Backups
05-24 05:25:34 INFO [backup.ha.hasource] A backup was already in progress
05-24 05:25:34 ERROR [backup.model.coordinator] A backup is already in progress
05-24 05:25:34 INFO [backup.model.coordinator] I'll try again in 10 minutes, 40 seconds
05-24 05:32:33 DEBUG [backup.model.destinationprecache] Preemptively retrieving and caching info from the backup destination to avoid peak demand
05-24 05:36:14 DEBUG [backup.model.syncer] Sync requested by Coordinator
05-24 05:36:14 INFO [backup.model.coordinator] Syncing Backups
05-24 05:36:15 INFO [backup.ha.hasource] A backup was already in progress
05-24 05:36:15 ERROR [backup.model.coordinator] A backup is already in progress
05-24 05:36:15 INFO [backup.model.coordinator] I'll try again in 21 minutes, 20 seconds
05-24 05:57:33 DEBUG [backup.model.destinationprecache] Preemptively retrieving and caching info from the backup destination to avoid peak demand
05-24 05:57:35 DEBUG [backup.model.syncer] Sync requested by Coordinator
05-24 05:57:35 INFO [backup.model.coordinator] Syncing Backups
05-24 05:57:35 INFO [backup.ha.hasource] A backup was already in progress
05-24 05:57:35 ERROR [backup.model.coordinator] A backup is already in progress
05-24 05:57:35 INFO [backup.model.coordinator] I'll try again in 42 minutes, 40 seconds
05-24 06:10:44 DEBUG [backup.model.syncer] Sync requested by HomeAssistant
05-24 06:10:44 INFO [backup.model.coordinator] Syncing Backups
05-24 06:10:44 DEBUG [backup.drive.driverequests] Requesting refreshed Google Drive credentials
05-24 06:10:45 INFO [backup.ha.hasource] Requesting a new backup
05-24 06:17:28 WARNING [backup.ha.hasource] A backup was already in progress
05-24 06:17:28 DEBUG [backup.model.syncer] Sync requested by HomeAssistant
05-24 06:17:28 INFO [backup.model.coordinator] Syncing Backups
05-24 08:37:35 DEBUG [backup.model.destinationprecache] Preemptively retrieving and caching info from the backup destination to avoid peak demand
05-24 08:37:35 DEBUG [backup.drive.driverequests] Requesting refreshed Google Drive credentials
05-24 08:45:12 DEBUG [backup.model.syncer] Sync requested by Coordinator
05-24 08:45:12 INFO [backup.model.coordinator] Syncing Backups
05-24 08:45:12 INFO [backup.ha.hasource] Requesting a new backup

It looks like backups take too long and the plugin wants to start new ones while another one is still in progress?

In the supervisor logs I see this, too:

2024-05-24 06:17:28.470 ERROR (MainThread) [supervisor.backups.manager] Backup a97bf3a0 error Traceback (most recent call last): File "/usr/src/supervisor/supervisor/backups/manager.py", line 261, in _do_backup async with backup: File "/usr/src/supervisor/supervisor/backups/backup.py", line 363, in __aexit__ self._outer_secure_tarfile.__exit__( File "/usr/local/lib/python3.12/site-packages/securetar/__init__.py", line 140, in __exit__ self._tar.close() File "/usr/local/lib/python3.12/tarfile.py", line 1975, in close self.fileobj.close() OSError: [Errno 5] I/O error

Maybe this helps in resolving the problem? Happy to help with questions!

Cheers, Stefan.