MariaDB and InfluxDB backup always corrupted

I wanted to migrate to Raspberry Pi 5 and take all my data from the old Pi 4. The restore failed and I was able to isolate the issue: When trying to restore my MariaDB and/or InfluxDB add-ons the supervisor reports:

2025-05-13 07:19:15.295 ERROR (MainThread) [supervisor.jobs] Unhandled exception: Error -1 Invalid deflate block found
Traceback (most recent call last):
File “/usr/src/supervisor/supervisor/jobs/decorator.py”, line 304, in wrapper
return await self._method(obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/supervisor/supervisor/addons/addon.py”, line 1404, in restore
tmp, data = await self.sys_run_in_executor(_extract_tarfile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/concurrent/futures/thread.py”, line 59, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/supervisor/supervisor/addons/addon.py”, line 1390, in _extract_tarfile
backup.extractall(
~~~~~~~~~~~~~~~~~^
path=tmp.name,
^^^^^^^^^^^^^^
members=secure_path(backup),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
filter=“fully_trusted”,
^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “/usr/local/lib/python3.13/tarfile.py”, line 2334, in extractall
self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(),
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
numeric_owner=numeric_owner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/tarfile.py”, line 2397, in _extract_one
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
set_attrs=set_attrs,
^^^^^^^^^^^^^^^^^^^^
numeric_owner=numeric_owner)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/tarfile.py”, line 2480, in _extract_member
self.makefile(tarinfo, targetpath)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/tarfile.py”, line 2534, in makefile
copyfileobj(source, target, tarinfo.size, ReadError, bufsize)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.13/tarfile.py”, line 250, in copyfileobj
buf = src.read(bufsize)
File “/usr/local/lib/python3.13/gzip.py”, line 340, in read
return self._buffer.read(size)
~~~~~~~~~~~~~~~~~^^^^^^
igzip_lib.IsalError: Error -1 Invalid deflate block found
2025-05-13 07:19:15.309 WARNING (MainThread) [supervisor.backups.backup] Can’t restore Add-on core_mariadb:

I tried to extract the contents of the two add-ons from the backup archive but I only received an “unknown error”. So indeed the archive is corrupted. But why?

What I tried to identify the root cause:

  • Repeat backup → still corrupted → no random event
  • Store on SD card and download via browser as well as on my NAS and downloaded via samba → still corrupted → most probably not caused by conversion while transmitting data via HTTP

I want to highlight the following for everyone who suffers from this issue too:

ha backup new --addons core_mariadb --uncompressed=true

→ Works!! This produces an uncompressed backup of only MariaDB. It can be restored without any problem.

From my point of view, there is something wrong with the compression in HA. Now I have questions:

  • Did I do something wrong?
  • The regular backups of MariaDB and InfluxDB are (at least for me) useless because I will not be able to restore them. Is there a way to schedule uncompressed backups? (I could do it using automations and fork the backup process so that it will not be subject to timeout - but this is not what I mean here :sweat_smile:)
  • Should I create a bug report? (I guess so, because this behavior destroys trust in HA. However, maybe someone knows what the odds are that it will get implemented at all…)

I am facing the same issue, my influx db size is round about 69GB. And all of my automatic Backups are corrupted. But in my case Corruption is not limited to the influx db Part of the Backup, all archives becomes unusable. I’ve now migrated my influxdb to a seperated Server, now Backups are working again. @janrothkegel short questions, what is your Maria DB size? It seems, that this issue might be related to file size.

It is 15GB of size