I deleted some old frigate clips a few weeks ago and today I discovered that my nightly backups have not been working.
Error from “Create Backup”:
Failed to to call /backups/new/full - Unknown error, see supervisor
From the Supervisor log:
Supervisor
await self.sys_run_in_executor(_folder_save, folder)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/supervisor/supervisor/backups/backup.py", line 442, in _folder_save
atomic_contents_add(
File "/usr/local/lib/python3.11/site-packages/securetar/__init__.py", line 188, in atomic_contents_add
atomic_contents_add(tar_file, directory_item, excludes, arcpath)
File "/usr/local/lib/python3.11/site-packages/securetar/__init__.py", line 188, in atomic_contents_add
atomic_contents_add(tar_file, directory_item, excludes, arcpath)
File "/usr/local/lib/python3.11/site-packages/securetar/__init__.py", line 191, in atomic_contents_add
tar_file.add(directory_item.as_posix(), arcname=arcpath, recursive=False)
File "/usr/local/lib/python3.11/tarfile.py", line 2157, in add
tarinfo = self.gettarinfo(name, arcname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/tarfile.py", line 2030, in gettarinfo
statres = os.lstat(name)
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/data/media/frigate/clips/driveway-1691343383.672016-p6n15h-clean.png'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/backups/manager.py", line 210, in _do_backup
await backup.store_folders(folder_list)
File "/usr/src/supervisor/supervisor/backups/backup.py", line 462, in store_folders
raise BackupError(
supervisor.exceptions.BackupError: Can't backup folder media: [Errno 2] No such file or directory: '/data/media/frigate/clips/driveway-1691343383.672016-p6n15h-clean.png'
So, it looks like the problem is the deleted Frigate clips. Is there a databse in Frigate that I may have corrupted by deleting old clips?
I added this to my configuration.yaml:
backup:
folder: /home/user/homeassistant/config/backup
excludes:
- media
I can now make a backup, but it is 18Gb, so the media folder is still being backed up? A partial backup of everything except media is only 587Mb.
So, how do I automatically back up everything except the media folder?
========== UPDATE ==========
Well, my backup: lines are wrong, but I don’t know why?