{"record":{"id":"8e6b2b963e2ff753","repo":"home-assistant/core","slug":"error-during-post-backup-result","errorCode":null,"errorMessage":"Error during post-backup: {result}","messagePattern":"Error during post-backup: (.+?)","errorType":"exception","errorClass":"BackupManagerError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/backup/manager.py","lineNumber":527,"sourceCode":"        )\n        for result in pre_backup_results:\n            if isinstance(result, Exception):\n                raise BackupManagerError(\n                    f\"Error during pre-backup: {result}\"\n                ) from result\n\n    async def async_post_backup_actions(self) -> None:\n        \"\"\"Perform post backup actions.\"\"\"\n        post_backup_results = await asyncio.gather(\n            *(\n                platform.async_post_backup(self.hass)\n                for platform in self.platforms.values()\n            ),\n            return_exceptions=True,\n        )\n        for result in post_backup_results:\n            if isinstance(result, Exception):\n                raise BackupManagerError(\n                    f\"Error during post-backup: {result}\"\n                ) from result\n\n    async def load_platforms(self) -> None:\n        \"\"\"Load backup platforms.\"\"\"\n        await integration_platform.async_process_integration_platforms(\n            self.hass,\n            DOMAIN,\n            self._add_platform,\n            wait_for_platforms=True,\n        )\n        LOGGER.debug(\"Loaded %s platforms\", len(self.platforms))\n        LOGGER.debug(\"Loaded %s agents\", len(self.backup_agents))\n\n    async def _async_upload_backup(\n        self,\n        *,\n        backup: AgentBackup,","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/backup/manager.py#L509-L545","documentation":"Raised by BackupManager.async_post_backup_actions when any registered backup platform's async_post_backup(hass) raises. Post-backup hooks run concurrently after backup generation (resuming recorder writes, unpausing databases); the first Exception is wrapped in BackupManagerError. The backup file itself is already written, but cleanup/resume steps failed.","triggerScenarios":"Completing a backup while a platform's post-backup hook raises — recorder failing to resume, database integrations erroring on unpause, or a buggy backup-platform implementation in a custom integration.","commonSituations":"Recorder database issues surfacing at resume time; the same integration that failed pre-backup also failing post-backup; systems where the DB went away during the (long) backup run.","solutions":["Inspect the embedded underlying error in the message to identify the failing platform.","Restart or check the affected integration (e.g., reload recorder, verify DB connectivity) — the backup file is fine, but the system may still have paused writes.","Fix or update the integration whose async_post_backup raised.","Verify system health afterwards (recorder running, DB accepting writes) since post-hooks failed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from homeassistant.components.backup.manager import BackupManagerError\n\ntry:\n    await manager.async_post_backup_actions()\nexcept BackupManagerError as err:\n    LOGGER.error(\"post-backup failed: %s; verify recorder resumed\", err)\n    await verify_system_writable()","preventionTips":["Verify database integrations are responsive after backups (failed post-hooks can leave writes paused).","Log the wrapped cause to identify the failing platform quickly.","Keep third-party backup platforms updated."],"tags":["backup","post-backup","platform-hook","home-assistant"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}