Home assistant fails to make backup

Home assistant fails to backup.
Running Odroid N2, config file shows no errors, core is the newest 2025.3.4
Log file is included. Anyone an idea how to fix?
Thx in advance for every reply.

Logger: homeassistant.components.backup
Bron: components/backup/manager.py:1149
integratie: Backup (documentatie, problemen)
Eerst voorgekomen: 15:42:47 (1 gebeurtenissen)
Laatst gelogd: 15:42:47

Error creating backup: Backup failed: [{‘type’: ‘HomeAssistantBackupError’, ‘message’: “Preparing backup of Home Assistant Core failed. Failed to inform HA Core: Unsuccessful websocket message - {‘id’: 9, ‘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’}]

What database are you running ?

I don’t know how to look into that. But at the moment home assistant seems bricked. I think i better restart completely. When i have time i will look up how to format the odroid en reinstall home assistant completely fresh. Thx for your reply.

I know this is an old question but ill post here what helped me with the same or similar problem.

  • I stoped the addon “Home Assistant Google Drive Backup” which locked the DB in the same time but could not finish the backup
  • Deleted the old backups
  • Changed the backup encryption key (Backup / Configure Backup Settings / Change encryption key)

After that it started working again

Thank you very much for this, even if the question was old.
Your workflow helped me solving my similar problem.
Thank you!

Hello,

Sorry for posting in an old thread, but I have the same error in the logs and I can't create backups (neither when I create them manually nor when HA should create its daily scheduled ones).

Logger: homeassistant.components.backup
Quelle: components/backup/manager.py:1232
Integration: Backup (Dokumentation, Probleme)
Erstmals aufgetreten: 06:42:30 (1 Vorkommnis)
Zuletzt protokolliert: 06:42:30

Error creating backup: Backup failed: [{'type': 'HomeAssistantBackupError', 'message': "Preparing backup of Home Assistant Core failed. Failed to inform HA Core: Unsuccessful websocket message - {'id': 240, '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}]

How could I fix this?
I have already tried excluding as many unnecessary entities as I could from the recorder, but it didn't fix the issue....

Thanks in advance
Aaron