Hello,
I have been struggling with creating backups since a while. I’m currently at version:
hassos: “14.1”
homeassistant: 2025.5.0
hostname: homeassistant
logging: info
machine: generic-x86-64
operating_system: Home Assistant OS 14.1
state: running
supervisor: 2025.04.1
but it started a while ago (I don’t know at which version, but I made quite a jump from a 2-3 year old version to current one about 5 months ago). What would happen is that I would start the backup creation, but it would fail after some time, and hours later I would see the backup is there, but it only has a size of 10kb.
My steps to solve this were:
delete all previous backups
create new backup: ha backups new --name “My Full Backup”
i get this error:
“An error occurred while making backup, check job ‘1e5cc755fb61488aa2ad4269c38b680a’ or supervisor logs for details”
check the error:
“ha jobs info 1e5cc755fb61488aa2ad4269c38b680a”
error output:
"errors:
- message: ‘Preparing backup of Home Assistant Core failed. Failed to inform HA
Core: Unsuccessful websocket message - {’‘id’‘: 227, ‘‘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
type: HomeAssistantBackupError
name: backup_manager_partial_backup
progress: 0
reference: e0896ea0
stage: home_assistant
uuid: c9d7a90a746f400cbf344db59eeb877c - child_jobs:
- child_jobs:
created: “2025-05-05T15:59:31.676114+00:00”
done: true
errors:- message: ‘Preparing backup of Home Assistant Core failed. Failed to inform HA
Core: Unsuccessful websocket message - {’‘id’‘: 202, ‘‘type’’: ‘‘result’’,
‘‘success’’: False, ‘‘error’’: {’‘code’‘: ‘‘pre_backup_actions_failed’’, ‘‘message’’:
‘‘Error during pre-backup: Could not lock database within 30 seconds.’’}}.’
stage: null
type: HomeAssistantBackupError
name: backup_store_homeassistant
progress: 0
reference: a8e44eae
stage: null
uuid: 9bbf828712fe4a0483d96d3ffe6ae803
created: “2025-05-05T15:58:36.658793+00:00”
done: true
errors:
- message: ‘Preparing backup of Home Assistant Core failed. Failed to inform HA
- message: ‘Preparing backup of Home Assistant Core failed. Failed to inform HA
Core: Unsuccessful websocket message - {’‘id’‘: 202, ‘‘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
type: HomeAssistantBackupError
name: backup_manager_partial_backup
progress: 0
reference: a8e44eae
stage: home_assistant
uuid: 384783c7d407436597f6be08bf76cdd9
- child_jobs:
remove db file:
rm /config/home-assistant_v2.db
restart core:
ha core restart
create backup again:
ha backups new --name ‘Clean Test Backup’
it’s done. Hope this helps