Migrate Mailcow to New Server in Quick and Easy Steps
Published: December 2nd, 2024 • 5 Min Read
Hello Folks, whether you are migrating or switching from Mailcow, this guide will show you how to migrate Mailcow to new server. You are required to follow the working steps in the guide to discover how Mailcow export emails to another server.
First, back up your Mailcow data and configure the destination server according to your requirements. Next, you need to install docker and docker compose on the new server and transfer the backup data. Lastly, update the DNS records like (MX, A, and SPF) and test the server functionality. To have a more detailed and steadier tutorial pls read the complete blog content.
Prerequisite for Successful Mailcow Migration with DIY Method
Please ensure to mark the below-mentioned points to successfully migrate Mailcow to new server.
- Operating System: Cross-check that you have the Ubuntu 20.4 or later version installed on your server.
- RAM Requirements: It is suggested to have 4 GB of free RAM space and 8GB for larger setups.
- Disk Space: Users should have 80 GB of free disk space available in their server for email, logs, contacts, calendars, Docker containers, etc.
- Docker and Docker Compose: These applications are essential to run Mailcow on any server. So, ensure that you have installed both of these properly.
- RSYNC and SCP: These are command line tools need to transfer backup files securely from Mailcow to new server.
- SSH (Secure Shell): It is the latest encrypted protocol to transfer files between two computers or nodes. Ensure you have installed it on your server with access to both servers.
From here onwards, we are assuming that you have successfully installed and checked all the requirements and tools on your server based on the above-mentioned list. Now, let’s discuss the actual working step-by-step tutorial to manually migrate Mailcow to new server.
DIY Methodology for Mailcow Migration to New Server
- At the start, stop the Mailcow services by running the docker command.
docker-compose down
- Next, backup the Mailcow data and configuration files by running the command.
rsync -av /opt/mailcow/backup /path/to/backup/location
rsync -av /opt/mailcow/.env /path/to/backup/location Now, on new server create the same directory in docker i.e. opt/mailcow by running the below command.
mkdir -p /opt/mailcow
- After that, migrate the backup Mailcow data to new server using rsync or scp using the command.
scp -r /path/to/backup user@newserver:/path/to/restore
- Thereafter, install the Mailcow on the new server by running the below-mentioned command.
git clone https://github.com/mailcow/mailcow-dockerized /opt/mailcow
cd /opt/mailcow.
./generate_config.sh - Finally, replace the .env and docker-compose.override.yml from the backup to the Mailcow directories to restore your Mailcow settings.
Limitations of Using Manual Technique to Migrate Mailcow
- One of the major drawbacks of using the manual approach to migrate Mailcow to new server is that it is a very time-consuming process.
- Another pitfall of using the DIY approach is that it requires lots of technical knowledge to perform Mailcow migration. Moreover, it is not possible to rollback the migration process in cases of any wrong step.
- Manual migration process typically involves downtime, especially when migrating large amounts of Mailcow data to new server or updating DNS.
- The major limitation of this technique is that it will not work in case of migration of Mailcow to a Non-Mailcow server.
Migrate Mailcow to Another Server Using the Automated Tool
Users choose the BitRecover IMAP Backup tool to migrate Mailcow to new server even if new server is a non-mailcow server. This utility is developed to simplify the server migration process with extremely easy-to-use UI/UX. This advanced tool is much simpler so non-technical users can also use this utility. Another impressive functionality of this tool is its filter setting to selectively migrate Mailcow data to another server. Now let’s have the actual working steps of the utility to automate the Mailcow migration process.
How to Migrate Mailcow to New Server Flawlessly? Quick Steps
- At the start, install and launch the suggested utility on your local desktop.
- Now, enter the credentials for the Mailcow user account that needed to migrate.
- Alternatively, insert the CSV file with IDs and password. to batch migrate Mailcow to new server.
- Next, enable the mailbox you are required to migrate and choose the saving option as IMAP.
- Then, click on the filter options and apply the filter settings accordingly for selective Mailcow migration.
- After that, enter the IMAP credentials for the destination server you are migrating to in the tool console.
- Finally, click on the convert button and wait for the Mailcow to new server migration process to complete.
Conclusion
To sum up the blog on the topic of how to migrate Mailcow to new server we have discussed a detailed guide. Initially, we have seen the manual technique along with the prerequisite to transfer the Mailcow server to another server. Secondly, the DIY approach has some limitations so we have uncovered an expert solution to simplify the Mailcow migration process. This method is useful as it will work in both scenarios if the destination server is Mailcow or non-mailcow.