ZipApp
DBCollect is a Python ZipApp, a special ZIP file containing all Python and SQL scripts that can be executed from a single file. It works similar to a self-extracting ZIP file (the zip file itself is executable).
What is ZipApp
A ZipApp package is a special ZIP file that can be executed by Python (2.6+). The OS detects that it is a Python package because
the ZipApp file starts with a shebang: #!/usr/bin/env python
head dbcollect
#!/usr/bin/env python
PK�VJ\
...
In order for this to work, /usr/bin/env python has to be setup so that it starts the correct Python interpreter:
/usr/bin/env python
Python 3.6.8 (default, Feb 5 2026, 20:19:29)
[GCC 8.5.0 20210514 (Red Hat 8.5.0-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
On recent RHEL linux versions, you have to specify if python start Python 2 or Python 3. Python 3 is recommended:
# set python to run Python 3 - requires root
alternatives --set python /usr/bin/python3
If that does not work then you cannot run dbcollect directly. However, the fallback is to simply run dbcollect with python:
python3 /usr/local/bin/dbcollect
References
Source code
The dbcollect ZipApp package is a specially prepared ZIP file. You can unzip it with a normal unzip tool. The files in the package are regular Python and SQL scripts. There are no pre-compiled binaries - making dbcollect completely transparent.
For example, listing the files in the package:
unzip -l /usr/local/bin/dbcollect
Archive: dbcollect
Length Date Time Name
--------- ---------- ----- ----
7040 02-10-2026 10:52 dbcollect.py
0 02-10-2026 10:52 lib/
0 10-31-2023 19:14 lib/__init__.py
2598 12-10-2025 13:02 lib/archive.py
268 02-10-2026 10:53 lib/buildinfo.py
5920 12-11-2025 19:21 lib/compat.py
1732 02-10-2026 10:52 lib/complete.bash
6535 02-10-2026 10:52 lib/config.py
8272 11-18-2025 18:00 lib/detect.py
...