How to Upgrade 3.0.1 to 3.1.0 without Losing Configuration

All information entered into Web UI of Diladele Web Safety is stored in qlproxy.sqlite database in /var/opt/quintolabs/qlproxy/console (BTW you should back it up regularly just in case). The differences between 3.0 and 3.1 versions of this database are small – in just one table. Please follow this algorithm to upgrade.

  1. Copy qlproxy.sqlite database from your current 3.0 installation to a spare machine (most easily – use the virtual appliance from our web site).
  2. Save the following SQL code into a file upgrade.sql:

    --- add a "enable_safe_search" column to "config_ruleblockpornography" table
    ALTER TABLE "config_ruleblockpornography" RENAME TO "config_ruleblockpornography_old";

    CREATE TABLE "config_ruleblockpornography" (
    "policy_id" integer NOT NULL PRIMARY KEY REFERENCES "config_policy" ("id"),
    "enable_heuristics" bool NOT NULL,
    "heuristics_level" varchar(16) NOT NULL,
    "enable_rta" bool NOT NULL,
    "enable_phrases" bool NOT NULL,
    "phrases_maximum_weight" integer NOT NULL,
    "enable_safe_search" bool NOT NULL

    INSERT INTO "config_ruleblockpornography" SELECT *, 'True' FROM "config_ruleblockpornography_old";
    DROP TABLE "config_ruleblockpornography_old";

  3. Run the sqlite command client perform the upgrade sqlite qlproxy.sqlite < upgrade.sql

Now replace the old qlproxy.sqlite within the virtual appliance with new qlproxy.sqlite, restart it and see all your configuration in the new Web UI. Press Save and Restart and make sure Squid and qlproxyd daemons within VA can be started successfully.

If everything is fine do the same in your production server – uninstall qlproxy 3.0, install qlproxy 3.1 and replace the qlproxy.sqlite with your upgraded file.

Just in case – do the backup of /etc/opt/quintolabs, /var/opt/quintolabs and /opt/quintolabs before upgrade.

Diladele Team.

About sichent

This entry was posted in qlproxy, upgrade. Bookmark the permalink.

1 Response to How to Upgrade 3.0.1 to 3.1.0 without Losing Configuration

  1. Gino Ferraro says:

    Just a suggestion, maybe these upgrade instructions (and general upgrading instructions) should be added to the Online Documentation for QLProxy.

Comments are closed.