Backup stopped working

Hi community,

for quite some time now i used the Samba Backup Addon to backup my HA on a daily basis and mirror the backup to my Synology DS. Some days ago it suddenly stopped working and I can’t figure out, why. As manual Backups via HA UI (Configuration > Backups > Create Backup) and also via Terminal (ha backups new) don’t work, I think I might have an issue with the filesystem / the database (see logs below. Over the weekend (just before the backups stopped working) I added some new Zigbee-Devices and activated the energy dashboard.

Supervisor Log

22-03-04 00:30:50 WARNING (MainThread) [supervisor.homeassistant.module] Error during Home Assistant Core backup. Check HA Core logs.
22-03-04 00:30:50 ERROR (MainThread) [supervisor.backups.manager] Backup 4e2682e5 error
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/backups/manager.py", line 149, in _do_backup
    await backup.store_homeassistant_config_dir()
  File "/usr/src/supervisor/supervisor/backups/backup.py", line 486, in store_homeassistant_config_dir
    await self.sys_homeassistant.backup(homeassistant_file)
  File "/usr/src/supervisor/supervisor/homeassistant/module.py", line 330, in backup
    await self.sys_run_in_executor(_write_tarfile)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/homeassistant/module.py", line 321, in _write_tarfile
    atomic_contents_add(
  File "/usr/src/supervisor/supervisor/utils/tar.py", line 180, in atomic_contents_add
    tar_file.add(directory_item.as_posix(), arcname=arcpath, recursive=False)
  File "/usr/local/lib/python3.9/tarfile.py", line 1963, in add
    tarinfo = self.gettarinfo(name, arcname)
  File "/usr/local/lib/python3.9/tarfile.py", line 1842, in gettarinfo
    statres = os.lstat(name)
FileNotFoundError: [Errno 2] No such file or directory: '/data/homeassistant/zigbee.db-journal'
22-03-04 00:32:12 INFO (MainThread) [supervisor.backups.manager] Creating new full backup with slug a6d88b2e
22-03-04 00:32:12 INFO (MainThread) [supervisor.backups.manager] Backing up a6d88b2e store Add-ons
22-03-04 00:32:13 INFO (MainThread) [supervisor.addons.addon] Building backup for add-on core_configurator
22-03-04 00:32:13 INFO (MainThread) [supervisor.addons.addon] Finish backup for addon core_configurator

Core Log

2022-03-04 00:30:50 WARNING (MainThread) [homeassistant.components.recorder] Database currently not locked
2022-03-04 00:30:50 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /backups/new/full - Unknown error, see supervisor
2022-03-04 00:30:56 WARNING (SyncWorker_0) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:31:26 WARNING (SyncWorker_6) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:31:56 WARNING (SyncWorker_7) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:32:26 WARNING (SyncWorker_1) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:32:56 WARNING (SyncWorker_3) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:33:26 WARNING (SyncWorker_2) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:33:56 WARNING (SyncWorker_0) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:34:26 WARNING (SyncWorker_5) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:34:56 WARNING (SyncWorker_6) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:35:26 WARNING (SyncWorker_4) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:35:56 WARNING (SyncWorker_7) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:36:26 WARNING (SyncWorker_0) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:36:51 WARNING (MainThread) [homeassistant.components.recorder] Database currently not locked
2022-03-04 00:36:56 WARNING (SyncWorker_8) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:37:26 WARNING (SyncWorker_6) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:37:56 WARNING (SyncWorker_9) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:38:26 WARNING (SyncWorker_7) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:38:56 WARNING (SyncWorker_1) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:39:36 WARNING (SyncWorker_5) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:40:06 WARNING (SyncWorker_4) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.
2022-03-04 00:40:36 WARNING (SyncWorker_8) [pyhomematic._hm] ServerThread.jsonRpcLogin: Unable to open session.

Thanks for any hints in advance!!

//EDIT

Forgot to give my system specs:

System Health

version: core-2022.2.5
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.92-v8
arch: aarch64
timezone: Europe/Berlin


logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok


host_os: Home Assistant OS 7.4
update_channel: stable
supervisor_version: supervisor-2022.01.1
docker_version: 20.10.9
disk_total: 14.1 GB
disk_used: 4.6 GB
healthy: true
supported: true
board: rpi3-64
supervisor_api: ok
version_api: ok
installed_addons: File editor (5.3.3), Samba Backup (5.0.0), Terminal & SSH (9.3.0)


dashboards: 2
resources: 0
views: 3
mode: storage

Hi,

Were you able to resolve this issue?.

I seem to face the same issue - unable to make a backup, Supervisor logging: FileNotFoundError: [Errno 2] No such file or directory: ‘/data/homeassistant/zigbee.db-journal’

/Kristian

Hi Kristian,
thanks for your reply. Unfortunately I didn’t find a solution. But I noticed that the automated samba backup works some days. Why? I don’t know, but at least I have a backup every few days and I didn’t get the time to find a real solution yet. If you do, please keep us updated, thanks!! :slight_smile:
Joe

Hi, for me, backup stopped working after upgrading to version core-2022.3.7. I am currently upgrading to Rasperry Pi 4 (from 3), but is stuck until my backup works - unless I redo all the current configurations which is a daunting task… I don’t know if it is a general bug in 2022.3.7+ or the issue is related to installed plugins/Zigbee Coordinater device/??? but for sure it’s annoying.

/Kristian

You can just copy the entire contents of your /config folder (including the hidden .storage folder) to your new system. You would then only have to install and set up any addons you use. Copying the configs from these to a text file before updating would make this easier.

You should also post in the samba backup topic. The dev responds to issues there.

https://community.home-assistant.io/t/samba-backup-create-and-store-backups-on-a-samba-share/199471

1 Like

Hello, same problem with me, but slightly different error: