Virus-safe backups with ClamWin Free Antivirus
This simple tutorial shows how to integrate Uranium Backup with the well-known antivirus
software ClamWin (http://www.clamwin.com). ClamWin is an open source software and
can be used freely also for commercial purposes.
The first thing to do, obviously, is to download ClamWin from its download page:
http://www.clamwin.com/content/view/18/46/ and install it on your PC where you want
to make backups with Uranium.
Due to ClamWin does not include an on-access real-time
scanner, it can coexist without any conflict with other antivirus software already installed
on the same system.
Using the command line utility of ClamWin you can scan and remove viruses every time
you perform a backup with Uranium.
We see below how to create a simple batch file, which we will call "antivirus_scan.bat",
to start ClamWin antivirus scanning, and how to run it through a simple Uranium's
option.
The contents of the batch file might be as follows:
"C:\Program Files\ClamWin\bin\freshclam.exe"
--datadir="C:\Documents and Settings\All Users\.clamwin\db"
--config-file= "C:\Program Files\ClamWin\bin\freshclam.conf"
"C:\Program Files\ClamWin\bin\clamscan.exe"
--database="C:\Documents and Settings\All Users\.clamwin\db"
--recursive --move="C:\quarantine"
--unzip="%TEMP%" --unrar="%TEMP%" "C:\mybackupsourcedir"
We can see two commands: the first is optional and serves to update the antivirus
before scanning (the PC must be connected to the Internet), the second serves to
perform the antvirus scanning. They are executed the programs freshclam.exe and
clamscan.exe, that are located in the "bin" folder in the installation directory
of ClamWin.
For the first command (freshclam.exe), we must specify the following parameters:
-- datadir: this is the path of the virus definitions database. In Windows NT, 2000, XP, 2003, this path is by default: C: \ Documents
and Settings \ All Users \. Clamwin \ db
-- config-file: the path of a small configuration file that mus be created manually
by us.
We called this file freshclam.conf (we can put it in any folder) and put inside
the following lines:
DatabaseMirror database.clamav.net
MaxAttempts 3
For the second command
(clamscan.exe) we must specify the following parameters:
-- database: this is the path of the virus definitions database. In Windows NT,
2000, XP, 2003, this path is by default: C: \ Documents and Settings \ All Users
\. Clamwin \ db
-- recursive: Make scanning also in subfolders
-- move: move infected files to the specified folder (if you want to delete immediately
infected files you can replace this parameter with --remove)
-- unzip --unrar: enables the scanning of compressed archives
As last parameter we have to specify the path of the folder we want to scan. If we want to scan more than one folder we will have to repeat the second command for
each folder.
Configuring Uranium for the execution of the batch file before
the backup:
Let's click on Backup Set options:
Then let's go in the panel "Other" and set up the option like we can see in the
image below:

Let's check the option "Run a program or a file:"
With the "Select" button we can select the batch file we've just created.
Then we must check the option "Wait for the end of the execution up to a maximum
of ..." and set the maximum time that we believe is necessary for the whole virus
scanning (and for updating if we put this command in the batch file). The program
will wait for the end of scanning up to the maximum time before start the
backup.
Checking the option "Visible" we will see a dos window with the scanning log.
To make effective this configuration we will have to click on "Apply".
----------------------------------------------------------------------
Click on the following link in order to download an exmple of the files "antivirus.bat"
and "freshclam.conf":
uranium-clamwin.zip
For any need or problem relating to this tutorial you can post a question on the
support
forum.
Note: this procedure can be used with any other
antivirus software that has the possibility to be run from command line.
FREESOFT SRL AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED AS PART OF THE SERVICES FOR ANY PURPOSE. ALL SUCH DOCUMENTS AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. FREESOFT SRL AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION, INCLUDING ALL WARRANTIES AND CONDITIONS OF MERCHANTABILITY, WHETHER EXPRESS, IMPLIED OR STATUTORY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL FREESOFT SRL OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF FREESOFT SRL OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THE SERVICES COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN. FREESOFT SRL MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED HEREIN AT ANY TIME.