1 (edited by bronweg 2021-05-06 02:06:44)

Topic: Migrate iRedmail to another server

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version:
    -- source: Ubuntu 20.04.1 (Focal Fossa)
    -- dest: Debian 10 (buster)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi all,
I'm trying to migrate the server to another machine.
I want it to remain the same version for now.
Bellow are the steps that I ran:

On the source machine:

sudo su - root
cd /var/vmail/backup/mysql/$(date '+%Y/%m/%d')/
tar -czvf /tmp/sql_backup.tgz *amavisd*.bz2 *iredadmin*.bz2 *iredapd*.bz2 *roundcubemail*.bz2 *vmail*.bz2
cd /var/vmail/
tar -czvf /tmp/vmail_dirs_backup.tgz mlmmj*
cd /opt/www/roundcubemail
tar -czvf /tmp/roundcube_backup.tgz composer.* vendor plugins config
cd /var/lib/dkim
tar -czvf /tmp/dkim_backup.tgz *.pem

I copy all the /tmp/*_backup.tgz files to the /tmp on destination machine and then

On the destination machine:

sudo su - root
mkdir sql_backup
cd sql_backup
cp /tmp/sql_backup.tgz .
tar -xzvf ./sql_backup.tgz
for file in *.bz2; do bunzip2 < $file | mysql -uroot -p ${file%%-*}; done
rm -f ./sql_backup.tar
cd -

cd /var/vmail/
mkdir backup
#mv mlmmj* pgp-keys public sieve vmail1 backup/
mv mlmmj* backup/
cp /tmp/vmail_dirs_backup.tgz .
tar -xzvf ./vmail_dirs_backup.tgz
rm -f ./vmail_dirs.tgz

cd /opt/www/roundcubemail
mkdir backup
mv composer.* vendor plugins config backup/
cp /tmp/roundcube_backup.tgz .
tar -xzvf ./roundcube_backup.tgz
rm -f ./roundcube_backup.tgz

cd /var/lib/dkim
mkdir backup
mv *.pem backup/
cp /tmp/dkim_backup.tgz .
tar -xzvf ./dkim_backup.tgz
rm -f ./dkim_backup.tgz

reboot

Unfortunately I failed to login to the roundcube or even open the webpage.
I get an HTTP ERROR 500
Also I failed to find the relevant log to understand what happen.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Migrate iRedmail to another server

Your procedure is wrong.

FYI: https://docs.iredmail.org/migrate.to.ne … erver.html