Upgrade to MetaDefender ICAP Server v5.7.0 or newer

Because Metadefender ICAP Server v5.7.0 is supporting bundle PostgreSQL version v16.0x then:

  • The ICAP Server instance which is using local PostgreSQL database:

    • Please read this document carefully before upgrade because:
      • With ICAP version older than v5.2.0, the SQLite database will be migrated to PostgreSQL database (the migration will take time)
      • With ICAP version from v5.2.0 to v5.6.0: the local database will be migrated from PostgreSQL v12.x to v16.x (this will take time also)
  • The ICAP Server instance which is used remote database will not be impacted

1.Upgrade to v5.7.0 or newer from Metadefender ICAP server older than v5.2.0 (Sqlite database)

Metadefender ICAP Server which older than v5.2.0 is using SQLite database, then please follow the guide line Upgrade to MetaDefender ICAP Server older than v5.2.0 (Sqlite) to version 5.2.0 -> v5.6.0 (PostgreSQL)

before upgrade, please backup the data and configuration to rollback incase upgrade failure Upgrade to MetaDefender ICAP Server older than v5.2.0 (Sqlite) to version 5.2.0 -> v5.6.0 (PostgreSQL)

2.Upgrade to v5.7.0 or newer from Metadefender ICAP server version from v5.2.0 to v5.6.0 (PostgreSQL database)

Please follow below steps to upgrade the Metadefender ICAP Server (including disaster recovery strategy)

Step 1: Check availability of free hard disk space

make sure the free space hard disk > 1.2 * size of pg_data folder

  • Linux: /var/lib/mdicapsrv/pg_data
  • Windows: C:\Program Files\OPSWAT\Metadefender ICAP Server\data\pg_data

Step 2: Stop mdicapsrv service

Step 3: Backup data

Backup pg_data folder

  • Linux: backup folder /var/lib/mdicapsrv/pg_data
  • Window: backup folder: <Installer-folder>\data\pg_data (default: C:\Program Files\OPSWAT\Metadefender ICAP Server\data\pg_data)

Step 4: Backup custom config for local PostgreSQL database

This step is required incase:

  • Case 1: enable TLS for local PostgreSQL or
  • Case 2: any tuning the Local PostgreSQL (such as: turning the max connection, work queue size, listening address, ....)

Linux: Back up all file in /usr/lib/mdicapsrv/postgres

Windows: back up all file in: <Installer-folder>/postgres (default: C:\Program Files\OPSWAT\Metadefender ICAP Server\postgres)

Step 5: Upgrade to Metadefender ICAP server v5.7.0

  • CentOS:
Bash
Copy
  • Debian:
Bash
Copy
  • Windows: double click the msi to install

Step 6: Restore custom config

This step is required if there is custom config of Step 4: Backup custom config for local PostgreSQL database

  • Copy pg_hba.conf from backup pg_data folder at Step 3: Backup data to :

    • Linux: /var/lib/mdicapsrv/pg_data
    • Windows: C:\Program Files\OPSWAT\Metadefender ICAP Server\data\pg_data
  • Copy all config files in postgres backup folder at Step 4: Backup custom config for local PostgreSQL database to:

    • Linux: /usr/lib/mdicapsrv/postgres
    • Windows: C:\Program Files\OPSWAT\Metadefender ICAP Server\postgres
  • Restart mdicapsrv service

Step 7: Recovery step if step 5 failed:

This step will help recover to older MD ICAP server version incase upgrade to v5.7.0 failed (Step 5: Start install Metadefender ICAP server v5.7.0)

Bash
Copy

- Debian

Bash
Copy

- Windows: uninstall the MD ICAP Server

  • Delete below folders if exist

    • Linux:

      • /var/lib/mdicapsrv/pg_data
      • /usr/lib/mdicapsrv/postgres
      • /usr/lib/mdicapsrv/postgres-old
    • Windows:

      • C:\Program Files\OPSWAT\Metadefender ICAP Server\data\pg_data
      • C:\Program Files\OPSWAT\Metadefender ICAP Server\postgres
      • C:\Program Files\OPSWAT\Metadefender ICAP Server\postgres-old
  • Rename pg_data-old to pg_data

    • Linux: rename /var/lib/mdicapsrv/pg_data-old to /var/lib/mdicapsrv/pg_data
    • Windows: rename C:\Program Files\OPSWAT\Metadefender ICAP Server\data\pg_data-old to C:\Program Files\OPSWAT\Metadefender ICAP Server\data\pg_data
  • Install old MD ICAP Server from installation package

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard