ClamAV Private Database Mirror Updater Tool
cvdupdate is a command-line tool designed to facilitate the creation and maintenance of private mirrors for ClamAV antivirus databases. It efficiently downloads the latest ClamAV signature databases (CVDs) and associated patch files (CDIFFs), replacing the older `clamdownloader.pl` script. The library is actively maintained, with its current version being 1.2.0, and receives regular updates to support new ClamAV features and address bug fixes.
Warnings
- gotcha As of v1.1.3, info-level and debug-level messages are directed to stdout instead of stderr. This change can impact existing scripts or logging configurations that differentiate between stdout and stderr.
- gotcha Running `cvd clean all` followed by `cvd update` too frequently (e.g., repeatedly in quick succession) can result in the official ClamAV database servers temporarily refusing download requests due to rate-limiting. This can cause databases to enter a 'cool-down' period.
- breaking In version 1.2.0, `cvdupdate` migrated its internal logging dependency from `coloredlogs` (unmaintained) to `colorlog`. While this is primarily an internal change, users relying on specific behaviors or customizations of the `coloredlogs` dependency might observe subtle differences, particularly if they were using internal logging mechanisms of `cvdupdate`.
- gotcha For users upgrading from versions prior to 1.1.0 (specifically from 1.0.2), the configuration file (`config.json`) was automatically migrated and split into `config.json` and `state.json` upon running `cvd update`. This was done to separate database state from user configuration, allowing for easier management with configuration tools.
- gotcha It is important to NOT use `cvdupdate` if you do not need to host a private database mirror. For direct updates on individual ClamAV clients, `freshclam` is significantly more efficient as it can update using small CDIFF patches. `cvdupdate`, conversely, downloads both the new daily CDIFF and the entire daily CVD.
Install
-
pip install cvdupdate
Imports
- cvdupdate
This library is primarily used as a command-line tool, not typically imported programmatically.
Quickstart
# Install cvdupdate (if not already installed) pip install cvdupdate # Run the update command to download ClamAV databases cvd update # (Optional) Serve the downloaded databases for testing (not production) cvd serve # (Optional) Configure database directory cvd config set --dbdir /path/to/your/mirror