Knowledge Base » Documentation MailCleaner »
Cloning a 2016 version of MailCleaner to a 2019 version
MailCleaner Support
Added over 5 years ago
If you have a 2016.xx version of MailCleaner (or earlier) and want to migrate it to our latest version, this is sadly not doable via the migration script we then provided. (The new underlaying version of Debian is changing from time to time and maintining this script would be a quite huge task in regard of the number of unmigrated MailCleaner hosts.
We still have a solution for you.
Install one of our VM images that you will find at
Go through the configurator process as described in the text file provided with the image. Then register your MailCleaner server.
Once this is done, stop MailCleaner services on BOTH servers
//usr/mailcleaner/etc/init.d/exim_stage1 stop
/usr/mailcleaner/etc/init.d/exim_stage2 stop
/usr/mailcleaner/etc/init.d/exim_stage4 stop
then on the old server, run
wget --no-check-certificate https://www.mailcleaner.net/downloads/vm/export_tables.sh
chmod +x export_tables.sh
./export_tables.sh
This will download a script to backup the MailCleaner s configuration from MySQL into the file
/tmp/migration.tar.gz
You now have to copy this file to the new server in /tmp . Then run on the new server :
wget --no-check-certificate https://www.mailcleaner.net/downloads/vm/import_tables.sh
chmod +x import_tables.sh
./import_tables.sh
On the old server run : (make please sure you ll have enough place on this partition
tar -czf /var/mailcleaner/quarantine.tar.gz /var/mailcleaner/spool/mailscanner/quarantine
tar -czf /var/mailcleaner/spam.tar.gz /var/mailcleaner/spam
Copy those 2 files to the new server and run in the directory where you copied these .tar.gz files
tar -xzf quarantine.tar.gz -C /
tar -xzf spam.tar.gz -C /
Some features have not yet be incorported in the database and are activated with flag file
so please copy all
/var/mailcleaner/spool/mailcleaner/mc-experimental-*
from the old server to the new one
The tracing tool is based on the logs of the server so if you want to be able to use this tool on data received before this migration, you will need to copy these logs.
This step is not provided in the scripts because for some servers, the log files are huge. If you want to transfer those log files to the new server, you need to copy those and make sure to preserve the rights and owners for those files
/var/mailcleaner/log/
from the old server to the IP of the new server. In case of a cluster, this has to be run from an old server to the new server that will have the same ID in the cluster.
You now can restart MailCleaner services with :
//usr/mailcleaner/etc/init.d/mailcleaner restart