{"record":{"id":"0a572222ab10f0b7","repo":"home-assistant/core","slug":"err-0a5722","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"exception","errorClass":"BackupManagerError","httpStatus":null,"severity":"error","filePath":"homeassistant/components/backup/manager.py","lineNumber":1217,"sourceCode":"                self._backup_task,\n            ) = await self._reader_writer.async_create_backup(\n                agent_ids=available_agents,\n                backup_name=backup_name,\n                extra_metadata=extra_metadata\n                | {\n                    \"instance_id\": await instance_id.async_get(self.hass),\n                    \"with_automatic_settings\": with_automatic_settings,\n                },\n                include_addons=include_addons,\n                include_all_addons=include_all_addons,\n                include_database=include_database,\n                include_folders=include_folders,\n                include_homeassistant=include_homeassistant,\n                on_progress=self.async_on_backup_event,\n                password=password,\n            )\n        except BackupReaderWriterError as err:\n            raise BackupManagerError(str(err)) from err\n\n        backup_finish_task = self._backup_finish_task = self.hass.async_create_task(\n            self._async_finish_backup(\n                available_agents, unavailable_agents, with_automatic_settings, password\n            ),\n            name=\"backup_manager_finish_backup\",\n        )\n        if not raise_task_error:\n\n            def log_finish_task_error(task: asyncio.Task[None]) -> None:\n                if task.done() and not task.cancelled() and (err := task.exception()):\n                    if isinstance(err, BackupManagerError):\n                        LOGGER.error(\"Error creating backup: %s\", err)\n                    else:\n                        LOGGER.error(\"Unexpected error: %s\", err, exc_info=err)\n\n            backup_finish_task.add_done_callback(log_finish_task_error)\n","sourceCodeStart":1199,"sourceCodeEnd":1235,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/components/backup/manager.py#L1199-L1235","documentation":"Raised by BackupManager.async_create_backup when generating the backup fails with BackupReaderWriterError from the local reader/writer; the message is the reader/writer's own error text (str(err)) re-wrapped as BackupManagerError. This is the filesystem-side failure of actually writing the tar file — most commonly insufficient disk space in the backup directory, but also permission or I/O errors.","triggerScenarios":"Starting a backup when the volume holding the backup directory is (nearly) full; the backup path is not writable (permissions changed, read-only FS); I/O errors while writing the large tar; the backup directory does not exist or cannot be created.","commonSituations":"Small HAOS boxes filling their disk with old backups; USB backup drive full/unmounted-ro; container installs where /backups is a small bind mount; permission changes after moving config.","solutions":["Check free space in the backup directory (df -h) and delete or offload old backups, then retry.","Verify write permissions on the backup directory and that the underlying filesystem is mounted read-write.","Read the embedded reader/writer message for the precise OS error (No space left on device, Read-only file system, Permission denied).","Consider excluding large folders or the database, or moving the backup directory to larger storage."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import shutil\n\nusage = shutil.disk_usage(manager.get_backup_path_dir())\nif usage.free < estimated_backup_size * 1.2:\n    raise RuntimeError(\n        f\"only {usage.free // 2**20} MiB free; backup will likely fail\"\n    )","typeGuard":null,"tryCatchPattern":"from homeassistant.components.backup.manager import BackupManagerError\n\ntry:\n    new_backup = await manager.async_create_backup(...)\nexcept BackupManagerError as err:\n    if \"No space left\" in str(err):\n        await prune_old_backups()\n        new_backup = await manager.async_create_backup(...)\n    else:\n        raise","preventionTips":["Check free space (with headroom for the tar) before starting backups.","Prune or move old backups automatically; monitor the backup volume.","Ensure the backup directory is writable and on a read-write filesystem."],"tags":["backup","disk-full","create-backup","reader-writer"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}