I am trying to knock down some persistent errors I have and this is one that’s plagued me. I’ve seen lots of other reports but no good resolution or even deeper troubleshooting steps.
I’m running HA in an HAOS VM on my Synology NAS. It’s running fine, mostly, no high CPU or storage usage. I configured automatic backups for once per week, Sunday mornings at 4:45 AM. My thought being it’s an intensive operation and nothing is going on and nobody is going to ask HA to do anything at that time. I backup all the configuration and history as well as the add-ons. HA estimates the size at ~9GB, through the tarball is smaller by a lot. I have it configured to store on my Synology NAS as well as Microsoft OneDrive, so a total of three locations.
This worked well when configured last summer. Then, in the fall, I started having a problem where the scheduled automatic backups always failed but manually triggering an automatic backup would succeed. I then had a separate problem where HA could do backups but all uploads (Synology and OneDrive) failed with no obvious error. I wanted to resolve this before cracking on with the other issues. The upload issues resolved when I installed the Feb .2 core update, so that part is now good. If I manually trigger an automatic backup it works and uploads to all configured locations.
But a scheduled backup always fails. The core log has the following:
Logger: homeassistant.components.backup
Source: components/backup/config.py:571
integration: Backup (documentation, issues)
First occurred: 4:45:43 AM (1 occurrence)
Last logged: 4:45:43 AMError creating backup: Backup failed: [{‘type’: ‘HomeAssistantBackupError’, ‘message’: “Preparing backup of Home Assistant Core failed. Failed to inform HA Core: Unsuccessful websocket message - {‘id’: 673, ‘type’: ‘result’, ‘success’: False, ‘error’: {‘code’: ‘pre_backup_actions_failed’, ‘message’: ‘Error during pre-backup: Could not lock database within 30 seconds.’}}.”, ‘stage’: ‘home_assistant’, ‘error_key’: None, ‘extra_fields’: None}]
The supervisor log has this:
2026-02-15 04:45:01.149 INFO (MainThread) [supervisor.backups.manager] Backup c9b57410 starting stage addon_repositories
2026-02-15 04:45:01.156 INFO (MainThread) [supervisor.backups.manager] Creating new partial backup with slug c9b57410
2026-02-15 04:45:01.310 INFO (MainThread) [supervisor.backups.manager] Backup c9b57410 starting stage home_assistant
2026-02-15 04:45:42.324 ERROR (MainThread) [supervisor.homeassistant.module] Preparing backup of Home Assistant Core failed. Failed to inform HA Core: Unsuccessful websocket message - {‘id’: 673, ‘type’: ‘result’, ‘success’: False, ‘error’: {‘code’: ‘pre_backup_actions_failed’, ‘message’: ‘Error during pre-backup: Could not lock database within 30 seconds.’}}.
2026-02-15 04:45:42.948 ERROR (MainThread) [supervisor.backups.manager] Backup c9b57410 error: Preparing backup of Home Assistant Core failed. Failed to inform HA Core: Unsuccessful websocket message - {‘id’: 673, ‘type’: ‘result’, ‘success’: False, ‘error’: {‘code’: ‘pre_backup_actions_failed’, ‘message’: ‘Error during pre-backup: Could not lock database within 30 seconds.’}}.
I’d like to troubleshoot this but I’m not sure where to go next. Is there any logging that can shed light on the locking issue on the database? Or is there any check of the database file that would help here?
I’d appreciate any next steps.