Upgrading existing POPFile data

Windows version of POPFile

The Windows installer for POPFile should automatically detect an existing POPFile installation and offer to update it. Sometimes an update involves changes to the format or structure of POPFile's corpus database and in these cases the installer will display some progress messages (because the update can take several minutes or even longer if a very large corpus database is involved).

Although the installer includes some additional Windows utilities used to display these progress messages (e.g. the Message Capture utility) the corpus database upgrade code is not part of the installer, it is actually part of POPFile.

Cross-Platform version of POPFile

This wiki page provides an overview of the corpus database upgrade process for cross-platform users.

Every time POPFile is started it checks to see if a corpus database upgrade is required. During these upgrades POPFile will not respond to requests from email clients and the POPFile UI will not work.

On some systems the upgrade of a very large database (over 100 MB) could take more than 30 minutes and during this time POPFile will appear to have locked up with high CPU load and lots of hard disk activity.

Upgrade instructions are usually given in the release notes enclosed in the zip file used for the cross-platform releases. These release notes are also available on-line, for example:

POPFile started using flat files for the corpus, switched to multiple BerkeleyDB database files (briefly) and currently uses a single SQLite database for the corpus. POPFile will automatically upgrade an existing corpus to the current format, provided you have installed the necessary Perl modules.

From the 0.22.2 release notes:

  • POPFile comes with a new “packing list” which will check automatically that the correct Perl modules are installed for POPFile to work correctly. This is important to cross platform users as it sanity checks the POPFile installation on start up.

See also:

SQLite Perl module

Be careful when adding the SQLite module - there are two incompatible versions (using the SQLite 2.x and SQLite 3.x libraries) and the current version of POPFile (0.22.5) only works with SQLite 2.x.

When POPFile started using SQLite the Perl SQLite module used the SQLite 2.x library but when SQLite 3.x was released the SQLite module was updated to use SQLite 3.x and a new Perl SQLite2 module was created to support SQLite 2.x. This situation can be rather confusing so the Wiki discusses it in some detail.

POPFile 0.22.5

By default, POPFile 0.22.5 uses SQLite2 Perl module. So if you install POPFile for the first time, there's no need to edit popfile.cfg.

POPFile 0.22.4 (or earlier)

You may find it easier to add the SQLite2 module to your Perl installation and manually edit popfile.cfg to use SQLite2 (as described here).

Upgrading process

The upgrade from a BerkeleyDB or flat file corpus to a SQLite database will occur when POPFile starts up. This database upgrade may take several minutes (or even tens of minutes) and during this time POPFile will appear to have locked up (e.g. the UI will not work). As each corpus bucket is converted, the old BerkeleyDB database file (table.db) or old flat file (table) will be deleted so you could look at the corpus directories to monitor the upgrade progress.

Since the corpus conversion process destroys your existing BerkeleyDB or flat file corpus, you are recommended to make a backup copy before trying to upgrade in case something unexpected happens during the upgrade.

By default the new SQLite database (popfile.db) is created in the same directory as the popfile.cfg file so you can safely delete the empty corpus directory tree once the BerkeleyDB or flat file corpus conversion has been completed.

howtos/upgradingpopfiledata.txt · Last modified: 2008/02/08 19:49 by

Should you find anything in the documentation that is incomplete, unclear, outdated or just plain wrong, please let us know and leave a note in the Documentation Forum.

Recent changes RSS feed Donate Driven by DokuWiki
The content of this wiki is protected by the GNU Fee Documentation License