Skip to main content

ClamAV Signature Mirroring Tool

Project description


The existing script does not have any error correction it simply bails out if a downloaded file is not valid and is unable to retry different mirrors if one fails.

This script will retry if a download fails with an http code that is not 404, it will connect to another mirror if retries fail or file not found or if the downloaded file is invalid.

It has options to set the locations for the working and mirror directory as well as user/group ownership for the downloaded files. It uses locking to prevent multiple instances from running at the same time.



$ clamavmirror -h

Usage: clamavmirror [options]

  -h, --help            show this help message and exit
  -a HOSTNAME, --hostname=HOSTNAME
                        ClamAV source server hostname
  -r TXTRECORD, --text-record=TXTRECORD
                        ClamAV Updates TXT record
  -w WORKDIR, --work-directory=WORKDIR
                        Working directory
  -d MIRRORDIR, --mirror-directory=MIRRORDIR
                        The mirror directory
  -u USER, --user=USER  Change file owner to this user
  -g GROUP, --group=GROUP
                        Change file group to this group
  -l LOCKDIR, --locks-directory=LOCKDIR
                        Lock files directory

Example Usage

$ clamavmirror -w ~/tmp/clamavtmp/ \
-d ~/tmp/clamavmirror/ -u andrew -g staff -a \
-l ~/Downloads/


Install from PyPi

pip install clamavmirror

Install from Githib

git clone
cd clamavmirror
python install


  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


All code is licensed under the MPLv2 License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for clamavmirror, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size clamavmirror-0.0.4-py2-none-any.whl (4.8 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size clamavmirror-0.0.4.tar.bz2 (8.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page