1 (edited by bnobre 2022-10-26 06:16:27)

Topic: Questions when migrating server

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

Hi people,

I'm trying to migrate from an old server to a new one, as in https://docs.iredmail.org/migrate.to.ne … erver.html

I performed the following steps:

1 - I migrated the email accounts stored in SQL, copying the base vmail - It worked.
2 - Transfer users' mailboxes by copying the contents of /var/vmail - It worked.
3 - Migrate Roundcube webmail data - This part I didn't understand what I should do, in the cited reference (https://github.com/roundcube/roundcubemail/wiki/Upgrade) it only says how to upgrade roundcube, not how to migrate. How to migrate?
4 - Migrate Amavisd, iRedAPD, iRedAdmin databases - It worked.
5 - Migrate DKIM keys - It worked.
6 - Force Dovecot to recalculate mailbox quota - It worked.

All procedures worked perfectly, I just didn't do step 3. Is it necessary? How to make?

Thx

----

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

2

Re: Questions when migrating server

bnobre wrote:

3 - Migrate Roundcube webmail data - This part I didn't understand what I should do, in the cited reference (https://github.com/roundcube/roundcubemail/wiki/Upgrade) it only says how to upgrade roundcube, not how to migrate. How to migrate?

Since new server already has the latest Roundcube, you can simply export Roundcube SQL db on old server, import it on new server (WARNING: it will overwrite the db), then upgrade its SQL structure with commands below:

cd /opt/www/roundcubemail/
./bin/updatedb.sh --dir=./SQL --package roundcube

WARNING: Better try it on a testing server before doing it on production server.

3

Re: Questions when migrating server

Hi, how are you?

Thanks for the answer. It worked. But I have 3 doubts.

1 - Without step 3 everything works fine. What types of information are transferred in the roundcubemail migration?

2 - In the process of exporting/importing the database, I usually (on the new server) delete the database, create a new one and write the exported *.sql. For example:

In console MariaDB:
DROP DATABASE roundcubemail;
CREATE DATABASE roundcubemail;

In console Linux:
mysql -u root roundcubemail < /root/migrate/roundcubemail.sql


That's right?

3 - My last question is about the command "./bin/updatedb.sh --dir=./SQL --package roundcube". You said it serves to update your SQL structure. But roundcube worked after I migrated the data, before and after running that command. In what cases is this command useful?

4

Re: Questions when migrating server

bnobre wrote:

In what cases is this command useful?

If there's any SQL structure change, this command applies the changes.