Of course, there should be no possibility of corruption and we are trying to do what ever we can to prevent it.
Corpus corruption may be caused by killing (terminating) the POPFile program abnormally as this may leave the corpus structure on disk in an incomplete state. This can happen when your computer is turned off or restarted without shutting down.
Possible symptoms of a corrupt corpus include:
Shutdown POPFile, then use the SQLite command-line utility to check the database (popfile.db).
Be careful when using the SQLite command-line utility - it is a powerful utility which can be used to alter the contents of the database so a mistake made when using it could corrupt the database and stop POPFile from working!
Windows users have several options:
A. Use the POPFile SQLite Database Status Check (a small Windows program) to check the database and display the results. The installer for 0.22.3 (or later) installs this program and creates a Start Menu entry for it:
Start –> Programs –> POPFile –> Support –> Check database status
If you are using an earlier version of POPFile, you can download the POPFile SQLite Database Status Check separately (175 KB zip file). This program can be run from any folder and it should be able to find and check the POPFile database automatically (all you have to do is run the program, no user input is required).
B. Use the “Check database status” shortcut which the 0.22.3 (or later) Windows installer creates in the 'User Data' folder. This shortcut uses the POPFile SQLite Database Status Check program to check the database in the 'User Data' folder.
C. Use the “Run SQLite utility” shortcut which the Windows installer creates in the 'User Data' folder. This shortcut runs the SQLite utility and tells it where to find the POPFile database. When the DOS-box appears, follow the cross-platform instructions below from step 4.
D. Run the SQLite command-line utility manually by changing to the 'User Data' folder (the folder where the POPFile data is stored, i.e. the directory containing the popfile.db file) and following the cross-platform instructions below from step 3. (If the 'User Data' is not in the same folder as the POPFile program, you'll need to specify the path to the sqlite.exe program - if you are not using Win9x then %POPFILE_ROOT%\sqlite can be used)
The Windows installer creates a Start Menu shortcut which can be used to display the location of the 'User Data' folder (Start –> Programs –> POPFile –> Support –> PFI Diagnostic utility (simple)). Starting with the POPFile 0.22.1 release there is another Start Menu shortcut which can be used to make it easy to access the 'User Data' folder (Start –> Programs –> POPFile –> Support –> Create 'User Data' shortcut).
Cross-platform users can check the SQLite database as follows:
1. open a command prompt (DOS box) or shell
2. switch to the directory where your POPFile data is stored, i.e. the directory containing the popfile.db file
3. open the database with the SQLite utility
4. Now run an integrity check (don't forget the semicolon at the end of the command)
5. Enter the command .q to exit from the utility.
Once a popfile.db is corrupted, your choices to rectify the situation are:
This may take some time depending on your corpus size, be patient and do NOT abort or kill POPFile or you will simply create another corrupt corpus.
For trouble upgrading from older version 0.20.x only see Corpus Corruption 0.20.x.
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.