One way to free some disk space is by periodically removing the MongoDB data and logs. You could manually delete all log files located in the <MetaDefender Core installation folder>\Mongo\log\ folder.
In order to permanently delete all scan logs and reset the MetaDefender Core database, please do the following.
Caution: This means you will permanently erase all logged scan results made before. If you do not want to lose any data from MongoDB and you prefer to change the location of the database and logs, follow this KB.
1. Open a command prompt with administrative privileges .
2. Change the directory to the directory where the Metascan Mongo Database is installed (e.g., cd "c:\program files\OPSWAT\MetaDefender Core 4\Mongo\64+" for MetaDefender Core 4).
3. Stop the Metascan service and the Metascan REST service by running the following commands:
net stop Metascan
net stop omsRest
4. Reset the database by running the following command:
mongo localhost:27018/metascan --eval "db.dropDatabase()"
mongo localhost:27018/omsdb --eval "db.dropDatabase()"
5. Start the Metascan service and the Metascan REST service by running the following commands:
net start Metascan
net start omsRest
This article applies to MetaDefender Core v3
This article was last updated on 2019-09-27