Nicknol
29. Oktober 2025 um 08:00
1
Mein HA speicher die automatischen Backups nach
lokal
Synology DSM
WebDav (NextCloud)
für lokal und Synology funktioniert das bislang 100%.
Es passiert leider immer mal wieder, dass zwar das große tar file in die NextCloud per WebDav gesichert wird, aber die kleine json Datei mit den Metadaten nicht gespeichert wird. Und das Backup den Eindruck erweckt, dass der Upload Stunden dauert. Und sich auch nicht (perGUI) abbrechen lässt.
Ich brauche eine Idee, weshalb die JSON Dateien nicht gespeichert wird. Habe in den HA logs und den Supervisor logs keine diesbezüglichen Einträge gefunden.
MarzyHA
29. Oktober 2025 um 08:27
2
Ich kann dir da leider nicht helfen, aber ich wäre mal so frei, @jbenecke anzupingen, da er ja der Code-owner ist und sich damit vermutlich am besten auskennt
Nicknol
29. Oktober 2025 um 08:32
3
ja, ich weiß von @jbenecke allerdings empfinde ich es als etwas unhöflich, den Code Owner direkt anzuschreiben, und evlt hatte ja schon jemand anders das Problem. Oder hat es. Und wir lösen es dann für alle.
3 „Gefällt mir“
Ich liefer mal meine Standard-Antwort
Was sagt das Log? Nvm, da hast du schon geschaut.
Hast du das Debug-Logging für WebDAV mal angemacht?
Nicknol
29. Oktober 2025 um 08:47
5
äh, nein.
wie mach ich das?
MarzyHA
29. Oktober 2025 um 08:49
6
Auf der Integrationsseite → 3 Punkte → Debug-Protokoll aktivieren.
Hab leider gerade keinen Screenshot zur Hand.
P.S. jbenecke, ich hoffe das mit dem Ping geht in Ordnung Danke für die extrem schnelle Antwort!
MarzyHA
29. Oktober 2025 um 08:51
8
Oben auf den 3 Punkten im Header!
Ja, alles gut, so langes es nicht übertrieben wird. Gerade bei Github kann das schnell ausarten.
1 „Gefällt mir“
Nicknol
29. Oktober 2025 um 09:47
11
hab das debug Log dank eurer Hinweise aktiviert. Und natürlich seh ich noch nix.
doch das nächtliche Backup „läuft“ immer noch. Was weitere Backups (wegen Integrations Updates) oder auch nur ein Neustarten von HA verhindert.
=>
Wie kann ich also ein (vermeintlich) laufendes Backup anhalten/unterbrechen/abbrechen?
MarzyHA
29. Oktober 2025 um 10:08
12
Das hatte ich auch mal irgendwann versucht - leider habe ich keine Lösung gefunden… Hab am Ende ein Hard restart gemacht (Stecker herausgezogen), aber das ist definitiv keine schöne Lösung.
Das dürfte über die homeassistant.restart Action gehen. Die wartet meines Wissen nach nicht auf das Backup (im Gegensatz zum Restart via der UI)
2 „Gefällt mir“
Nicknol
29. Oktober 2025 um 10:21
14
Ich gewinne den Eindruck, dass die Backup Probleme welche sind, die bei vielen HA-Nutzern auftauchen.
offen 03:07AM - 23 Oct 25 UTC
integration: backup
### The problem
I started noticing problems with GUI-initiated backups failing … to store to a WebDAV destination and "spinning forever" perhaps coincidentally with upgrade to 10.0. Backups even to local destinations began to spin forever shortly thereafter. Problem stated at https://community.home-assistant.io/t/backups-failing-coincident-with-2025-10-0-update/938487 with no solution. I have since transitioned to other hardware and the backups do not complete from the perspective of the GUI and recorded states. They show as failed even though the tar files are present on the local media.
Claude pulled together the analysis. I'll spare you its suggestions as I don't know the codebase well enough to know if it is hallucinating or being truly useful.
## Summary
Backups fail to complete on HAOS installations. Home Assistant Core initiates a backup successfully and receives initial progress events, but the backup process hangs indefinitely after the `addon_repositories` stage. The backup job completes successfully in Supervisor, but Home Assistant Core never receives the completion event.
## Environment
Installation method: Home Assistant OS
Core: 2025.10.3
Supervisor: 2025.10.0
Operating System: 16.2
Frontend: 20251001.4
```
# ha info
arch: amd64
channel: stable
docker: 28.3.3
features:
- reboot
- shutdown
- services
- network
- hostname
- timedate
- os_agent
- haos
- resolved
- journal
- disk
- mount
hassos: "16.2"
homeassistant: 2025.10.3
hostname: homeassistant
logging: info
machine: qemux86-64
machine_id: 72b21e07527745b48ed954584c746819
operating_system: Home Assistant OS 16.2
state: running
supervisor: 2025.10.0
supported: true
supported_arch:
- amd64
- i386
timezone: America/Los_Angeles
```
Both bare metal on ODRIOD C2 and Proxmox VM running OVA image on Dell Wyze 5070 (Pentium 5005) have been impacted.
## Steps to Reproduce
1. Initiate a backup through Home Assistant UI
2. Observe backup progress in logs
3. Backup progresses to `addon_repositories` stage
4. No further progress is shown
5. Backup appears to hang indefinitely
## Expected Behavior
1. Backup should progress through all stages
2. Backup should complete successfully and report completion to user
3. Backup file should be available in configured locations
## Actual Behavior
1. Backup reaches `addon_repositories` stage
2. No further progress events are received
3. Home Assistant Core remains in "creating backup" state indefinitely
4. User interface shows backup as "in progress" forever
5. Backup file IS created successfully locally
6. Backup is NOT written to the WebDAV store, if enabled
7. Supervisor job shows as completed successfully
## Evidence
### Home Assistant Core Logs
```
2025-10-22 16:23:12.259 DEBUG (MainThread) [homeassistant.components.backup] Backup state: idle -> create_backup
2025-10-22 16:23:12.259 DEBUG (MainThread) [homeassistant.components.backup] Received backup event: CreateBackupEvent(manager_state=<BackupManagerState.CREATE_BACKUP: 'create_backup'>, reason=None, stage=None, state=<CreateBackupState.IN_PROGRESS: 'in_progress'>)
2025-10-22 16:23:12.261 DEBUG (MainThread) [homeassistant.components.backup] Finished fetching backup data in 0.000 seconds (success: True)
2025-10-22 16:23:12.296 DEBUG (MainThread) [homeassistant.components.backup] Received backup event: CreateBackupEvent(manager_state=<BackupManagerState.CREATE_BACKUP: 'create_backup'>, reason=None, stage=<CreateBackupStage.ADDON_REPOSITORIES: 'addon_repositories'>, state=<CreateBackupState.IN_PROGRESS: 'in_progress'>)
2025-10-22 16:23:12.296 DEBUG (MainThread) [homeassistant.components.backup] Finished fetching backup data in 0.000 seconds (success: True)
```
(No further log entries related to backup)
### Supervisor Job Status
Output from `ha jobs info` for the backup job:
```yaml
ignore_conditions: []
jobs:
- child_jobs:
- child_jobs: []
created: "2025-10-22T23:23:12.278812+00:00"
done: true
errors: []
extra: null
name: backup_store_homeassistant
progress: 100
reference: "21294352"
stage: null
uuid: e8b4bf941bad44e598e561d36c06ea02
- child_jobs:
- child_jobs: []
created: "2025-10-22T23:23:34.687711+00:00"
done: true
errors: []
extra: null
name: backup_addon_save
progress: 100
reference: a0d7b954_ssh
stage: null
uuid: 84f1b872c8d4469d8ea7c3b9ed0daa2c
created: "2025-10-22T23:23:34.687558+00:00"
done: true
errors: []
extra: null
name: backup_store_addons
progress: 100
reference: "21294352"
stage: null
uuid: 4d3d2b6acfb64d2398e949541dedd9b4
- child_jobs:
- child_jobs: []
created: "2025-10-22T23:23:34.906561+00:00"
done: true
errors: []
extra: null
name: backup_folder_save
progress: 100
reference: ssl
stage: null
uuid: c5d70a43b6ad41f4b94fa83c36360362
created: "2025-10-22T23:23:34.906366+00:00"
done: true
errors: []
extra: null
name: backup_store_folders
progress: 100
reference: "21294352"
stage: null
uuid: 441f0106bd19469086a3074a6a281b21
created: "2025-10-22T23:23:12.269546+00:00"
done: true
errors: []
extra: null
name: backup_manager_partial_backup
progress: 100
reference: "21294352"
stage: finishing_file
uuid: 5b1c9ddfc7874a239463af988ac9b2db
```
### Filesystem Evidence
The actual backup file on disk confirms the timeline:
```bash
# stat /mnt/data/supervisor/backup/manual-no-media-no-share-all-add-ons-both-destinations_2025-10-22_16.23_12261913.tar
File: manual-no-media-no-share-all-add-ons-both-destinations_2025-10-22_16.23_12261913.tar
Size: 782796800 Blocks: 1528912 IO Block: 4096 regular file
Device: 811h/2065d Inode: 131102 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2025-10-22 16:23:12.275634462 -0700
Modify: 2025-10-22 16:23:34.918733057 -0700
Change: 2025-10-22 16:23:34.918733057 -0700
```
### Key Observations
From Supervisor job status:
- Job status: `done: true`
- Job errors: `[]` (empty - no errors)
- Job progress: `100` (complete)
- Final stage: `finishing_file`
- All child jobs completed successfully:
- `backup_store_homeassistant` - done
- `backup_store_addons` (including addon `a0d7b954_ssh`) - done
- `backup_store_folders` (ssl folder) - done
- Job creation time: `2025-10-22T23:23:12.269546+00:00` (16:23:12 local time)
- Job completed by: `2025-10-22T23:23:34.906561+00:00` at latest (16:23:34 local time)
- Total time: ~22 seconds from start to completion
From filesystem:
- ✅ File access time: `16:23:12.275` - matches when Supervisor job started (0.006 seconds after job creation)
- ✅ File modify time: `16:23:34.918` - matches when Supervisor job completed (0.012 seconds after job marked done)
- ✅ File size: 782,796,800 bytes (~746 MB) - backup is complete and valid
- ✅ Write duration: 22.643 seconds from first access to final modification
This ~~proves~~ _suggests:_
1. The backup file was successfully created and completed
2. The completion timestamps precisely match between Supervisor job status and filesystem
3. The file is not corrupted or incomplete (full 746 MB file)
4. Supervisor successfully finished writing the backup file at 16:23:34.918
5. HA Core was still waiting for events at this time and beyond
6. Three independent sources (HA Core logs, Supervisor job status, filesystem) all corroborate the timeline
## Timeline Analysis
Comparing Home Assistant Core logs with Supervisor job timestamps and filesystem evidence:
| Time | Event | Source |
|------|-------|--------|
| 16:23:12.259 | Backup state: idle -> create_backup | HA Core |
| 16:23:12.269 | Job created in Supervisor | Supervisor |
| 16:23:12.275 | Backup file first accessed (write begins) | Filesystem |
| 16:23:12.278 | backup_store_homeassistant started | Supervisor |
| 16:23:12.296 | Last event received by HA Core (addon_repositories stage) | HA Core |
| 16:23:34.687 | backup_store_addons completed | Supervisor |
| 16:23:34.906 | backup_store_folders completed | Supervisor |
| 16:23:34.906 | Job completed (stage: finishing_file) | Supervisor |
| 16:23:34.918 | Backup file last modified (write complete) | Filesystem |
| [never] | Completion event received by HA Core | ❌ Missing |
**Critical Gap:** Supervisor completed the backup at 16:23:34 (~22 seconds after start), confirmed by filesystem write completion at 16:23:34.918, but HA Core never received any events after 16:23:12.296 (the initial addon_repositories event). During the 22+ seconds of backup activity, HA Core received zero progress updates.
## Technical Analysis
### Event Flow Architecture
Home Assistant Core receives job progress events from Supervisor through the following mechanism:
1. **Supervisor → HA Core WebSocket Connection**
- Supervisor sends events via websocket to HA Core
- Endpoint: `websocket_supervisor_event` in `homeassistant/components/hassio/websocket_api.py:99-104`
2. **Event Dispatcher**
- Events are dispatched internally via `async_dispatcher_send(hass, EVENT_SUPERVISOR_EVENT, msg[ATTR_DATA])`
- Signal name: `EVENT_SUPERVISOR_EVENT = "supervisor_event"`
3. **Event Listener in Backup Code**
- Located in `homeassistant/components/hassio/backup.py:714-739`
- Method: `_async_listen_job_events()`
- Subscribes to `EVENT_SUPERVISOR_EVENT` signal
- Filters for matching job UUID
4. **Progress Callback**
- Located in `homeassistant/components/hassio/backup.py:394-409`
- Method: `on_job_progress()`
- Processes event data and updates UI
5. **Blocking Wait**
- Located in `homeassistant/components/hassio/backup.py:414`
- Code: `await backup_complete.wait()`
- Waits indefinitely for `backup_complete` event to be set
- Event is set when `data.get("done") is True` in progress callback
### Where the Process Hangs
**File:** `homeassistant/components/hassio/backup.py`
**Method:** `SupervisorBackupReaderWriter._async_wait_for_backup()`
**Line:** ~414
```python
async def _async_wait_for_backup(self, backup, locations, *, on_progress, ...) -> WrittenBackup:
backup_complete = asyncio.Event()
backup_id: str | None = None
create_errors: list[dict[str, str]] = []
@callback
def on_job_progress(data: Mapping[str, Any]) -> None:
"""Handle backup progress."""
nonlocal backup_id
if not (stage := try_parse_enum(CreateBackupStage, data.get("stage"))):
_LOGGER.debug("Unknown create stage: %s", data.get("stage"))
else:
on_progress(CreateBackupEvent(reason=None, stage=stage, state=CreateBackupState.IN_PROGRESS))
if data.get("done") is True:
backup_id = data.get("reference")
create_errors.extend(data.get("errors", []))
backup_complete.set() # <-- This never gets called
unsub = self._async_listen_job_events(backup.job_id, on_job_progress)
try:
await self._get_job_state(backup.job_id, on_job_progress)
await backup_complete.wait() # <-- Blocks here forever
finally:
unsub()
# Code after this point never executes
```
### What We ~~Know~~ _Believe_
1. ✅ Backup job was successfully created in Supervisor
2. ✅ Home Assistant Core subscribed to job events
3. ✅ Initial job state was fetched and processed (showing addon_repositories stage)
4. ✅ Supervisor completed the backup successfully with no errors
5. ❌ Home Assistant Core never received events after the initial addon_repositories event
6. ❌ Home Assistant Core is blocked at `backup_complete.wait()` with no timeout
7. ❌ The `on_job_progress` callback with `done: True` was never called
### Potential Causes
_(I'll spare you this as I can't confirm it to be reasonable)_
## Impact
### User Impact
- **High:** Users cannot create backups through Home Assistant UI
- Backup appears to hang with no feedback
- No error message or indication of what went wrong
- User can not restart Home Assistant, reboot is also blocked
<img width="352" alt="Image" src="https://github.com/user-attachments/assets/8302d56c-2511-46fa-a7fc-280ad5d072c8" />
<img width="352" alt="Image" src="https://github.com/user-attachments/assets/cc990094-00d1-4e57-94ef-2f25a6284b36" />
### System Impact
- **Medium:** Home Assistant remains in "creating backup" state
- Backup manager is blocked and cannot process other backup operations
- Resources held by waiting coroutine are not released
- No timeout mechanism to recover automatically
### Workarounds
Currently no known user-facing workarounds. The backup does complete in Supervisor, but:
- HA Core is unaware of completion
- Backup is not registered in HA Core's backup manager
- Backup cannot be accessed through HA Core UI
- HA Core backup state must be manually reset
## Root Cause Assessment
_(More conjecture from here on down that I can't fairly evaluate removed.)_
### What version of Home Assistant Core has the issue?
2025.10.3
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Backup
### Link to integration documentation on our website
_No response_
### Diagnostics information
[config_entry-backup-01K661PAHTFFV70GSA109ZJ7NN.json](https://github.com/user-attachments/files/23076861/config_entry-backup-01K661PAHTFFV70GSA109ZJ7NN.json)
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
```
### Additional information
_No response_
das Upload Problem, bzw die Quittierung des Uploads betrifft wohl nicht nur WebDav sondern auch Google.
@jbenecke Evtl kannst du da im Hintergrund jemanden anstupsen
1 „Gefällt mir“
Nicknol
29. Oktober 2025 um 12:24
15
homeassistant.restart hat funktioniert - danke!
1 „Gefällt mir“
Nicknol
29. Oktober 2025 um 12:30
16
so, debug log hab ich aktiviert.
und auch ein händisches Backup gestartet. Und das lief (natürlich ) durch.
Die letzten Log Zeilen bzgl Backup sind im Supervisor Log:
2025-10-29 12:57:11.049 INFO (MainThread) [supervisor.backups.manager] Backup 79e0273f starting stage finishing_file
2025-10-29 12:57:11.052 INFO (MainThread) [supervisor.backups.manager] Creating partial backup with slug 79e0273f completed
2025-10-29 12:57:11.064 INFO (MainThread) [supervisor.api.backups] Downloading backup 79e0273f
2025-10-29 12:57:11.064 INFO (MainThread) [supervisor.api.backups] Downloading backup 79e0273f
habe allerdings weder im Core Log noch im Supervisor Log einen Eintrag zu WebDav gefunden.
Die Backups liegen an allen 3 Orten (siehe oben), eben auch in meiner NextCloud.
Ich lass das Debug-Logging mal aktiviert, und hoffe, dass es beim nächsten Fehler - wenn er denn kommt … - hilfreiche Einträge finde.
MarzyHA
29. Oktober 2025 um 12:39
17
Wurden die json files jetzt auch mit gespeichert?
Nicknol
29. Oktober 2025 um 12:41
18
ja die json Dateien wurden gespeichert.
so wie es in den meisten Fällen in der Vergangenheit war. aber eben nicht immer.
1 „Gefällt mir“
Nicknol
29. Oktober 2025 um 15:40
19
@jbenecke
Habe mir das aktuelle debug Log von WebDav angeschaut, und seit neustart und erfolgreicher Erstellung eines Backups bin ich von den vielen 200, 201, 204 und 207 Return Codes nicht überrascht
Hier einige Auszüge mit maskiertem Speicherort (unvollständig, und evtl in falscher Reihenfolge)
2025-10-29 13:12:03.927 DEBUG (MainThread) [aiowebdav2.client] Got response with status: 201
2025-10-29 13:12:03.928 DEBUG (MainThread) [homeassistant.components.webdav.backup] Uploaded backup to /backup/Auto/Automatic_backup_2025.10.4_2025-10-29_12.56_10820332.tar
2025-10-29 13:12:06.975 DEBUG (MainThread) [aiowebdav2.client] Got response with status: 201
2025-10-29 13:12:06.975 DEBUG (MainThread) [homeassistant.components.webdav.backup] Uploaded metadata file for /backup/Auto/Automatic_backup_2025.10.4_2025-10-29_12.56_10820332.metadata.json
2025-10-29 13:12:09.728 DEBUG (MainThread) [aiowebdav2.client] Request to https://meinspeicherort.info/remote.php/webdav/backup/Auto/Automatic_backup_2025.10.4_2025-10-29_12.56_10820332.metadata.json with method PROPFIND
2025-10-29 13:12:09.890 DEBUG (MainThread) [aiowebdav2.client] Got response with status: 207
2025-10-29 13:12:09.890 DEBUG (MainThread) [aiowebdav2.client] Request to https://meinspeicherort.info/remote.php/webdav/backup/Auto/Automatic_backup_2025.10.4_2025-10-29_12.56_10820332.metadata.json with method GET
2025-10-29 13:12:10.158 DEBUG (MainThread) [aiowebdav2.client] Got response with status: 200
2025-10-29 13:12:10.165 DEBUG (MainThread) [aiowebdav2.client] Request to https://meinspeicherort.info/remote.php/webdav/backup/Auto/Automatic_backup_2025.10.3_2025-10-26_03.47_49005057.tar with method DELETE
2025-10-29 13:12:11.358 DEBUG (MainThread) [aiowebdav2.client] Got response with status: 204
Ich werd das Debug Log heute Abend wieder einschalten, und mal sehen, was das automatische Backup liefert.
Bin mir allerdings nicht mehr sicher, ob es ein WebDav Issue ist, oder ein Backup Issue.
MarzyHA
29. Oktober 2025 um 17:19
20
Soweit ich weiß sind alle 2xx Status erfolgreich (also kein Fehler). So steht das da ja auch. Bin mal gespannt, wie es aussieht, wenn der Fehler wieder auftritt