home-assistant/core · warning · BackupManagerError
Backup manager busy: {self.state}
Error message
Backup manager busy: {self.state} What it means
Raised by BackupManager.async_receive_backup (the HTTP upload path for importing a backup file) when the manager's state is not BackupManagerState.IDLE. The manager is a single-flight state machine (IDLE/CREATE_BACKUP/RESTORE_BACKUP/RECEIVE_BACKUP...), so a second concurrent operation is rejected immediately.
Source
Thrown at homeassistant/components/backup/manager.py:967
for backup_id, error_dict in zip(backup_ids, delete_results, strict=True)
for error in error_dict.values()
if error and not isinstance(error, BackupNotFound)
}
if agent_errors:
LOGGER.error(
"Error deleting old copies: %s",
agent_errors,
)
async def async_receive_backup(
self,
*,
agent_ids: list[str],
contents: aiohttp.BodyPartReader,
) -> str:
"""Receive and store a backup file from upload."""
if self.state is not BackupManagerState.IDLE:
raise BackupManagerError(f"Backup manager busy: {self.state}")
self.async_on_backup_event(
ReceiveBackupEvent(
reason=None,
stage=None,
state=ReceiveBackupState.IN_PROGRESS,
)
)
try:
backup_id = await self._async_receive_backup(
agent_ids=agent_ids, contents=contents
)
except Exception:
self.async_on_backup_event(
ReceiveBackupEvent(
reason="unknown_error",
stage=None,
state=ReceiveBackupState.FAILED,
)View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Wait for the current operation to finish (watch the manager state / backup events) and retry the upload.
- Check for in-progress operations via the backup websocket API or UI banner before uploading.
- Serialize backup operations in scripts/automations (queue them) instead of firing concurrently.
Defensive patterns
Strategy: validation
Validate before calling
from homeassistant.components.backup.manager import BackupManagerState
if manager.state is not BackupManagerState.IDLE:
LOGGER.info("manager busy (%s); deferring upload", manager.state)
return # or subscribe to events and retry later Try / catch
from homeassistant.components.backup.manager import BackupManagerError
try:
backup_id = await manager.async_receive_backup(
agent_ids=agent_ids, contents=contents
)
except BackupManagerError as err:
if "busy" in str(err):
raise HTTPTooManyRequests from err
raise Prevention
- Check manager.state is IDLE before starting uploads.
- Serialize backup operations in automations (queue or lock).
- Subscribe to backup events to know when the manager frees up.
When it happens
Trigger: Uploading a backup file via the UI/API while another backup is being created, restored, or already uploading; two upload requests racing; retrying an upload before the previous attempt fully finished (state not yet reset to IDLE).
Common situations: User starts a second operation in another tab/device; automation triggers a backup while a manual upload is in progress; a restore still running in the background.
Related errors
- Failed to upload backup
- Upload timed out after {UPLOAD_TIMEOUT} seconds
- {result}
- Invalid filename: {suggested_filename}
- You need at least Home Assistant version {backup_meta_versio
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/c9e80264167662bc.
Report an issue: GitHub.