Title
Page icon
Create new category
Edit page index title
Edit category
Edit link
Upgrade to MetaDefender Core 5.21.0 or later on Windows systems with a non-ASCII locale
Check your MetaDefender Core version and Operating System
This guide applies to MetaDefender Core on Windows, when upgrading to version 5.21.0 or later.
Summary
Starting with MetaDefender Core 5.21.0, the product bundles PostgreSQL 18. PostgreSQL 18 cannot initialize its database cluster if the Windows system locale name contains non-ASCII characters. For example, Turkish Windows uses the locale Turkish_Türkiye.1254, which contains ü.
Check if your system is affected
Before upgrading, open PowerShell and run:
If the returned locale name contains non-ASCII characters, your system is affected and you must follow the procedure below.
If the locale name contains only ASCII characters, no action is required — upgrade as usual.
Alternative: upgrade without preserving processing history
If your system is affected but you do not need to retain your processing history, you can use the following simpler procedure instead of the database backup and restore steps.
Fresh install new MetaDefender Core v5.21.0 or latest version
Import back the configuration to new installed MetaDefender Core.
How to upgrade safely
Follow these steps in order. Your scan history, license, and settings will be preserved at the end.
Step 1 — Back up your data from current installed Core
Open Command Prompt as Administrator.
Change to the PostgreSQL binary directory of the current installation:
<Installation Folder>\postgres\bin. Example:cd "C:\Program Files\OPSWAT\MetaDefender Core\postgres\bin"Export the database:
pg_dumpall.exe -h <pg_host> -p <pg_port> -U <pg_user> -f <backup_location>\Core_backup.sqlExample:
pg_dumpall -h localhost -p 5432 -U postgres -f C:\OPSWAT\Core_backup.sql
If you are prompted for a password, enter the password configured for the bundled PostgreSQL instance.
Confirm that
Core_backup.sqlwas created and is not empty.
Step 2 — Edit the backup file
Open
Core_backup.sqlin a text editor.Remove every occurrence of the keyword
UNLOGGED. This prevents errors when the dump is restored into the new database.Save the file.
Example:
Before (what's in the dump file):
CREATE UNLOGGED TABLE cached_scan.schema_version ( version smallint, instance_id smallint ) PARTITION BY LIST (instance_id);After (what it should look like):
CREATE TABLE cached_scan.schema_version ( version smallint, instance_id smallint ) PARTITION BY LIST (instance_id);
Step 3 — Uninstall current MetaDefender Core
Uninstall the current MetaDefender Core.
Step 4 — Install new MetaDefender Core version
Run the Core installer. Once installation completes, do not activate or configure anything yet.
Step 5 — Restore your data
Stop the MetaDefender Core service.
Following this guideline to manually start the bundled PostgreSQL service.
Open Command Prompt as Administrator and change to the PostgreSQL binary directory:
List all databases to find the MetaDefender Core database name:
Look for the database whose name begins with metadefender_core_ — for example, metadefender_core_h21nqf. Note this name; you need it in the following steps.
Drop the existing database:
Create an empty database with the same name:
Restore the backup into the new database:
Depending on the size of the dump, the restore may take several minutes.
Start the MetaDefender Core service.
Note: Replace
metadefender_core_h21nqfin the commands above with the actual database name you identified in step 3. The suffix is generated per installation and differs on every system.
Step 6 — Verify
Open the MetaDefender Core web management console and confirm the following:
Processing History shows your previous scan records.
Settings retain your previous configuration.
Your license is still active.
Need help?
If you encounter errors during the restore step or MetaDefender Core does not start after the upgrade, contact OPSWAT Support for help.