r1 - 16 Feb 2007 - 14:44:52 - LucaGibelliYou are here: ClamAV Wiki >  Main Web  > ScriptedUpdates

The main.cvd updates performed in 2005 and 2006 caused an enermous traffic on many database mirrors (some of them hit 100 mbit/s) and showed that the previous incremental update scheme based on two database files (main.cvd and daily.cvd) is no longer sufficient.

Previous situation

Sigmakers update the daily.cvd database usually a few times a day. When the database becomes too big (>­1MB) most of the signatures get moved to the main database. With the current number of ClamAV users and the size of main.cvd almost 4MB (as of May, 8th 2006) every main update generates a huge load on the mirrors and makes the admins unhappy.

Current situation

The current update model was a big success and what's most important it was efficient and very stable solution. To preserve backward compatibility and make the new procedure safe (i.e. allow on a fallback to the old method in case of failure) it will remain untouched and the new model will use CVD files as a starting point.

The basic idea is to unpack CVD files into a subdirectory daily.inc or main.inc of the standard database directory (dbdir) and continue incremental updates with unpacked databases. Libclamav would be then ignoring all *.cvd files in dbdir and instead loading the official databases from dbdir/daily.inc To emulate functionality of the CVD header a new file would be added into every container file: dbinfo.db_name (e.g. in main.cvd there would be dbinfo.main). It should contain all the important values found in a particular CVD header as well as the checksums of all the plain databases from that CVD (eg. main.db, main.ndb,...). Every dbinfo file must be digitally signed .

Incremental updates will be provided through compressed scripts and distributed together with CVD databases. The mirrors will keep the last 10 days update scripts to handle clients which call freshclam only once per week or so.

Interpreter commands:

  • OPEN ­ load a selected database into memory
  • DEL ­ remove a single signature from the database
  • ADD ­ add a single signature at the end of a selected database
  • REN ­ rename a signature
  • CLOSE ­ close the current database and save changes to disk
  • MOVE ­ move signatures from one database to another
  • XCHG exchange lines

-- TomaszKojm? - 16 Feb 2007


</center-->

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding ClamAV Wiki? Send feedback