How to Upgrade MetaDefender Core in Docker While Retaining Old Data?

This article will guide you on how to upgrade the MetaDefender Core container in Docker by using the option UPGRADE_DB

Note: The option “UPGRADE_DB” only supports the shared database.

In this scenario, I will upgrade MetaDefender Core from version 5.4.0 to 5.13.2. The current installation contains historical processing data and sanitized files. My objective is to retain all existing data and configuration settings after the upgrade.

My MD Core container’s current status:

  • Version 5.4.0
  • Database: remote shared database
  • Data
    • quarantine files, sanitized files
    • history processing
    • configuration

Upgrading MD Core

I will upgrade MD Core to version 5.13.2

Step 1: stop the old MD Core container.

Step 2: deploy the new MD Core version and using UPGRADE_DBfor keeping old data after upgrading to new version.

Please note that

  • MD_INSTANCE_NAME should be the same with the old MD Core version.
  • MDCORE_UPGRADE_FROM_DB_NAME should be the old database name that the old MD Core connect. You can connect to you PostgreSQL to check database name again or you can run the support package the database name will be in the file named pg_db.info in the folder database
  • MIGRATE_HISTORY = true if you would like to keep your database history processing. Please note that the migrating data can take time depending on the size of database.
  • mount the quarantine folder and the sanitized folder to the same folders in host machine to retrieve quarantine files and sanitized files. For example:

After deploying the new container, you can check the logs and will see the upgrading and migrating data.

Step 3:

  • Checking MD Core status from Docker status

Step 4:

  • Verify the old history processing, old quarantine file, old sanitized files and the configuration workflow.
_sanitized files are available for downloading_

sanitized files are available for downloading

_quarantine files are available for further actions_

quarantine files are available for further actions

Step 5: Let recheck database

You can connect to your database server to verify the MD Core database. In the new MD Core logs you can see this event.

This means during the upgrade process, MD Core create a new database and migrate database from the old version to the new version. Let connect to the PostgreSQL server and verify it

From the image you can see that we have 2 databases, mdcoredb is the old database and metadefender_core_ 5_13_3 is that new database.

If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.

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