Backup MetaDefender Managed File Transfer
This page applies to a standalone MetaDefender Managed File Transfer™ (MetaDefender® MFT) v3 installation. It explains what to back up, how to restore MetaDefender® MFT on the same server or at a disaster recovery (DR) site, and how to test the procedure safely. For an HA cluster, see High Availability; HA protects against the failure of one node, not against losing a whole site (see HA is not disaster recovery).
MetaDefender® MFT does not back itself up on a schedule. The installer and an encryption key change take database backups of their own, but only to roll back that operation if it fails; they are not recovery points. You need your own backups of every component below, and you need to be able to restore all of them to the same point in time.
What makes up an MetaDefender® MFT installation
Component | Where it is | What it holds |
|---|---|---|
Encryption secret |
| The secret that protects the database connection strings and the other secrets MetaDefender® MFT stores (storage credentials, directory and email passwords, SSO and MFT-to-MFT keys). A database backup cannot be used without the matching |
Rotated encryption keys | The folder set as Path to save rotated keys under Settings → Security → Encryption, if encryption key rotation is enabled | A copy of each file encryption key that a scheduled rotation creates. A restore does not need them when |
Service configuration | In the install folder: the | Encrypted database connection strings, service and web server settings. |
Web server certificate | The certificate, key and password files that | The TLS certificate of the MetaDefender® MFT web interface. MetaDefender® MFT does not copy these files into its install folder. |
Customized texts and images |
| Your branding and wording changes. |
Databases | Microsoft SQL Server: | Users, settings, file and share records, workflows, audit log, license record. |
File storage | The storage configured under Settings → File Storage: a local folder, a network share (SMB), an Amazon S3 bucket or an S3-compatible bucket | The uploaded files. Files are not stored in the database. |
License | Activated against the server's deployment ID | See Licensing on restore. |
Keep the backup set consistent
The databases and the file storage describe each other: every file in storage has a record in sft_data, and the encryption secret must match the databases. Restore all components from the same point in time:
If the databases are older than the storage, storage holds files that MetaDefender® MFT does not know about.
If the storage is older than the databases, MetaDefender® MFT lists files that no longer exist, and downloads fail.
If
secret.binand the databases come from either side of an encryption key change, MetaDefender® MFT cannot decrypt its connection strings and stored credentials.Never combine an MetaDefender® MFT server or installer of one version with databases from another version. See What goes undetected.
Take the database and storage backups as close together as possible, ideally in a quiet period, and keep a record of the exact MetaDefender® MFT version (as shown in Windows Apps or Programs and Features) with each backup set.
Backing up
Encryption secret and configuration
Copy
secret.bin, the configuration files, the web server certificate files and any customized texts and images (see the table above) to a secured location that is separate from the MetaDefender® MFT server. TheServicesfolder'sLogsandJobLogssubfolders are not needed.Copy them every time you back up the databases, for example with a scheduled task on the MetaDefender® MFT server that runs right after the database backup. Every encryption key change, whether manual (Change encryption key) or a scheduled rotation, replaces
secret.binand re-encrypts the secrets in the database. Asecret.binfrom before a key change cannot be used with a database backup from after it, and the other way round.If encryption key rotation is enabled, also back up the Path to save rotated keys folder.
Protect these copies like a password:
secret.bintogether with a database backup gives access to every secret stored in MetaDefender® MFT. Keep them apart from the database backups.
The encryption key you can download under Settings → Security → Encryption is not secret.bin and cannot replace it in a restore. The settings export holds settings only, without users, files or the encryption secret, so it does not replace a database backup either.
Also record, for each backup set: the MetaDefender® MFT version, the server's hostname and IP address, the SQL Server name, the storage paths or bucket names, and the license key.
Databases
Back up sft_conn and sft_data with SQL Server native backups (BACKUP DATABASE), on the same schedule.
Where SQL Server runs | How to schedule the backups |
|---|---|
A separate SQL Server (Standard or Enterprise) | A SQL Server Agent job or maintenance plan. |
SQL Server Express (on the MetaDefender® MFT server or elsewhere) | SQL Server Express has no SQL Server Agent. Use Windows Task Scheduler to run |
SQL Server Express LocalDB (older installations only) |
|
Example, run as an account with backup rights on both databases:
Copy the .bak files off the server after each run. Adjust authentication (-E for Windows authentication, -U/-P for a SQL login) and encryption options to your environment.
MetaDefender® MFT creates its databases with the simple recovery model, so you can restore to the time of a full or differential backup. If you need finer recovery points, your database administrator can switch the databases to the full recovery model and schedule transaction log backups.
If SQL Server runs on the MetaDefender® MFT server, a hypervisor snapshot is safe for the databases only if it is application-consistent (taken through VSS with the SQL Server VSS Writer). Even then, keep native backups: they are the only copy you can restore to a different SQL Server and verify on their own.
File storage
Storage type | How to back it up |
|---|---|
Local folder | Back up the folder or the volume it is on. Keep it on a separate drive from the operating system. A full backup of the MetaDefender® MFT server includes it. |
Network share (SMB) | Snapshots or backups on the file server or NAS. A backup of the MetaDefender® MFT server does not include it. |
Amazon S3 | S3 Versioning, plus Cross-Region Replication or AWS Backup if you need a copy outside the region. |
S3-compatible | The equivalent versioning or replication feature of your storage vendor. |
Schedule the storage backup to match the database backup.
MetaDefender® MFT server
Back up the whole server (VM backup or full OS backup) so that you can restore it as it was. If you cannot, you can rebuild the server instead: see Option B. Rebuilding needs the encryption secret, the configuration files and the exact MetaDefender® MFT version recorded with the backup set.
Restoring
There are two ways to bring MetaDefender® MFT back:
Option A: restore the MetaDefender® MFT server from its VM or OS backup. Use it when the server backup is available. The restored server keeps its hostname and its MetaDefender® MFT identity, and, if it also keeps its MAC address, its license.
Option B: rebuild the MetaDefender® MFT server. Install the same MetaDefender® MFT version on a new server and attach it to the restored databases. Use it when there is no server backup, or when you move to new hardware. The new server gets a new MetaDefender® MFT identity, so expect to activate the license again.
Before you start
Make sure the original MetaDefender® MFT server is off and stays off, or that the restored server cannot reach the original's databases and storage. MetaDefender® MFT does not detect a second copy of itself. See What goes undetected.
Restore
sft_connandsft_datato SQL Server, from the same backup set as the storage. If you restore to a different SQL Server and MetaDefender® MFT uses a SQL login, map the database users to the login on the new server (ALTER USER ... WITH LOGIN = ...); the login needsdb_owneron both databases.Restore the file storage to the same path or bucket it had before. MetaDefender® MFT finds each file from the storage settings in the database (share path or bucket, plus the file's name in it), and it uses the credentials stored there, so those credentials must work at the DR site too. If the share path or bucket has to change, use a DNS alias for the file server, or contact OPSWAT Support before you start MetaDefender® MFT.
Option A: restore the server
Restore the server from its backup, with its original MAC address. Start it with the network adapter disconnected in the hypervisor (not removed; see Licensing on restore).
Stop the MetaDefender® MFT services and set their startup type to Manual until you have finished the steps below. The services are
mftHelper(which also runs the web server),mftREST,mftNext,mftProcessor,mftCacheandmftNodeManager; all of them depend onmftHelper. In an elevated PowerShell prompt:Get-Service mft* | Set-Service -StartupType ManualStop-Service mftHelper -Force # also stops the services that depend on itConnect the server to the network. Check its IP address, DNS records and the names on its TLS certificate.
If the server is joined to a domain, repair its trust relationship before anything uses Windows authentication (SQL Server, AD synchronization, SSO). A server restored from an older backup can have an out-of-date computer account password. In an elevated PowerShell prompt:
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)If the SQL Server name or port is different from before, repoint MetaDefender® MFT with the Database Configuration Tool, from an elevated prompt in the
Toolsfolder of the install folder:.\SftDatabaseConfigurationTool.exe --server <new-sql-server>The tool checks the new connection, stops the services, updates the connection string in every place MetaDefender® MFT stores it, and starts the services again. If anything fails, it rolls back. Do not edit the configuration files by hand: the connection string is also stored, encrypted, in the
sft_conndatabase. The tool decrypts the current connection string withsecret.bin, so it fails ifsecret.bindoes not match the restored databases. It is not available for LocalDB installations. As an alternative, keep the old SQL Server name and point it at the new server with a DNS alias.Set the MetaDefender® MFT services back to Automatic and start them:
Get-Service mft* | Set-Service -StartupType AutomaticStart-Service mft*Check the license (see Licensing on restore), then run the checks after a restore.
Option B: rebuild the server
Prepare a Windows Server that meets the system requirements. Give it the original hostname if you can: the hostname is part of the license's deployment ID, and URLs, certificates and partner systems refer to it.
Copy the backed-up
secret.binto the new server.Install the same MetaDefender® MFT version that the backup set was taken with, and attach it to the restored databases. In the installer, choose to use the existing databases and the existing encryption secret; from the command line, use
DbInstallMode=CreateToExistingwithPathToSecret=<path to secret.bin>and the database server options. See Installing from the command line. An older installer refuses databases from a newer version. A newer installer upgrades the databases during installation, which adds an upgrade to your recovery, so prefer the same version.Re-apply what is set up on the server itself rather than in the database: the web server certificate files, customized texts and images, firewall rules, and any changes you had made to the configuration files (compare them with the backed-up copies).
Sign in as an administrator and activate the license (see Licensing on restore).
Run the checks after a restore.
Checks after a restore
Before you let users and partner systems back in:
Sign in as an administrator. Check that Settings → Security → License shows a valid license.
In Settings → File Storage, check that the active storage is reachable. Download a file that was uploaded before the backup point.
Upload a new file and download it again. Check that it is scanned by MetaDefender Core.
Check the connections to your directory service (AD/LDAP), the email server and your SSO provider. If the server's address changed at the DR site, also update it wherever other systems point to MetaDefender® MFT: DNS, the SSO provider's redirect URLs and MFT-to-MFT peers.
Review workflows, scheduled jobs and MFT-to-MFT connections before you reconnect them to their destinations. Jobs that ran after the backup point will run again (see Known limitations).
Licensing on restore
MetaDefender® MFT's license is activated against the server's deployment ID, shown under Settings → Security → License. The deployment ID is calculated from the server's hostname and the MAC addresses of its network adapters. If it changes, the license is no longer valid on that server and has to be activated again. Until then, MetaDefender® MFT keeps running and administrators can sign in, but other users cannot sign in and nobody can upload files.
Keep the deployment ID unchanged
Change on the restored server | Deployment ID |
|---|---|
Same hostname, same network adapter with the same MAC address | Unchanged: the license stays valid |
Different hostname | Changes |
Different MAC address: a new or replaced network adapter, a VM restored or cloned as a new VM with a newly generated MAC address, or a MAC address that the hypervisor assigns dynamically (for example in Hyper-V, when the VM starts on another host) | Changes |
A network adapter added, removed or disabled in Windows | Can change |
Rebuilt server (Option B) | Changes, and the license record belongs to the original server, so activate again |
A different VM UUID or different CPU, memory or disks | Not part of the deployment ID |
To restore without activating again:
Give the MetaDefender® MFT server's network adapter a static MAC address in the hypervisor, and restore the VM with that MAC address. This is the most common reason a restored or migrated MetaDefender® MFT server loses its license. Because the restored server has the original's MAC address, never run it on the same network as the original.
Keep the hostname and the same number of network adapters.
If the server uses NIC teaming, give the team a static MAC address as well: a team's MAC address can change between restarts.
When you start a restored server without network access, disconnect its network adapter in the hypervisor. Do not remove the adapter or disable it in Windows: that changes the deployment ID.
When you have to activate again
If the license was activated online and the server has internet access, click Deactivate License first. This releases the activation of the original deployment ID on the OPSWAT activation server. Then click Activate License.
If the license was activated offline, if the restored server has no internet access, or if deactivation fails: activate with the new deployment ID (Offline Activation through My OPSWAT works from any machine with internet access), and ask OPSWAT Support to release the old deployment ID. Deactivating an offline-activated license in MetaDefender® MFT only removes it from MetaDefender® MFT; the activation stays in use until Support releases it.
If your activation key has no free activation left, the new deployment ID cannot be activated until Support releases the old one. For an air-gapped DR site, or if you cannot wait for Support during a disaster, agree the procedure with OPSWAT, or ask your account team about an extra activation for DR, before you need it.
See License Activation for the activation steps.
A standby MetaDefender® MFT server that runs permanently at the DR site is a separate installation and needs its own license. Check your entitlement with your OPSWAT account team.
Testing your disaster recovery procedure
Test the restore regularly, and never in a way that lets the restored copy reach production. A restored MetaDefender® MFT server is configured to talk to your production SQL Server (if it is remote), your production file storage, MetaDefender Core, the email server, your directory service, MFT-to-MFT peers and every workflow destination. MetaDefender® MFT has no maintenance mode: as soon as its services start, scheduled workflows run, queued emails are sent and MFT-to-MFT requests are forwarded. The isolated network is what keeps the test away from production.
Build an isolated test network with no route to production and no outbound internet access (otherwise a restored server can still reach an S3 bucket).
Restore copies of
sft_conn,sft_dataand the file storage into the isolated network.Restore the MetaDefender® MFT server into the isolated network with its network adapter disconnected in the hypervisor, stop the MetaDefender® MFT services and set them to Manual.
Connect the adapter to the isolated network and point MetaDefender® MFT at the database copies with
SftDatabaseConfigurationTool.exe --server <test-sql-server>. If the server is domain-joined, the isolated network needs a domain controller too, or Windows authentication fails.Make the storage copy available under the same path (for a network share, a test file server with the same name in the isolated DNS).
Start the services and run the checks after a restore.
What goes undetected
Version mismatch. The MetaDefender® MFT services do not check the database version when they start; only the installer does. A server restored from an older backup starts against newer databases, then fails on individual operations. Always restore the server and the databases from the same backup set.
A second copy of the same server. A restored server is the same MetaDefender® MFT node as the original. If both run against the same databases, MetaDefender® MFT does not warn you: both run workflows, retention, MFT-to-MFT forwarding and notifications on the same data and storage.
Cloning the MetaDefender® MFT server
A clone of the MetaDefender® MFT server is a copy of the same MetaDefender® MFT node. That is what you want when the clone replaces the original, and for an isolated DR test. Do not clone the MetaDefender® MFT server to create a second, independent MetaDefender® MFT server, such as a test or standby server: the clone keeps the original's MetaDefender® MFT identity, and this identity survives uninstalling MetaDefender® MFT from the clone. Install an independent server on a clean Windows installation instead, or contact OPSWAT Support before installing MetaDefender® MFT on a clone.
Known limitations
Data loss window. Everything after the last consistent backup set is lost: uploads, shares, settings changes and audit entries. Links that users received after that point stop working.
Repeated work. The restored databases do not know what happened after the backup point. Workflows that run on a frequency start as soon as the services start. A transfer workflow checks each destination file and, depending on its settings, skips it, overwrites it or keeps a second copy. MFT-to-MFT requests that were forwarded after the backup point are forwarded again (the target reports files it already has), and emails that were still queued at the backup point are sent again.
Encryption key changes. Each key change or scheduled rotation replaces
secret.bin. Asecret.binand a database backup from either side of a key change cannot be used together, so back them up together.No built-in backup or DR. MetaDefender® MFT has no scheduled backup and no automated failover to another site. The database backups that the installer and encryption key changes take exist to roll back that operation, not to recover from a disaster.