Update migrate.to.new.iredmail.server.html.

This commit is contained in:
Zhang Huangbin 2020-05-07 10:29:34 +08:00
parent 71f8724c24
commit 15f693aa97
2 changed files with 47 additions and 3 deletions

View File

@ -61,7 +61,7 @@ Notes:
all required changes.
* Here are all [upgrade tutorials for iRedMail](https://docs.iredmail.org/iredmail.releases.html).
## MySQL/PostgreSQL: Migrate mail accounts
## MySQL/MariaDB/PostgreSQL: Migrate mail accounts
All mail accounts are stored in database `vmail`.
@ -75,6 +75,29 @@ All mail accounts are stored in database `vmail`.
you can simply export `vmail` database on old server, then import it on new
server. Check [upgrade tutorials for iRedMail](./iredmail.releases.html).
### MySQL/MariaDB inside FreeBSD Jail
If you run iRedMail server in a jailed FreeBSD system, restored SQL database
on new jailed system may have privilege error like this:
```
ERROR 1449 (HY000): The user specified as a definer ('root'@'10.195.20.1') does not exist
```
iRedMail installer created SQL tables (or VIEWs, TRIGGERs) as `root@10.195.20.1`
(`10.195.20.1` was private IP address of your old Jail system), but this
address was gone on new jailed system. You must replace old IP address by the
new one, fix it with SQL commands below as SQL root user:
!!! attention
Replace `<NEW-IP>` by the real private IP address of your jailed system.
```
USE mysql;
UPDATE mysql.proc SET definer = 'root@<NEW-IP>' WHERE definer='root@10.195.20.1';
```
## Migrate mailboxes (Maildir format)
!!! warning

View File

@ -21,7 +21,10 @@
<li><a href="#migrate-old-iredmail-server-to-the-latest-stable-release">Migrate old iRedMail server to the latest stable release</a><ul>
<li><a href="#client-settings-outlook-thunderbird">Client settings (Outlook, Thunderbird)</a></li>
<li><a href="#ldap-migrate-mail-accounts">LDAP: migrate mail accounts</a></li>
<li><a href="#mysqlpostgresql-migrate-mail-accounts">MySQL/PostgreSQL: Migrate mail accounts</a></li>
<li><a href="#mysqlmariadbpostgresql-migrate-mail-accounts">MySQL/MariaDB/PostgreSQL: Migrate mail accounts</a><ul>
<li><a href="#mysqlmariadb-inside-freebsd-jail">MySQL/MariaDB inside FreeBSD Jail</a></li>
</ul>
</li>
<li><a href="#migrate-mailboxes-maildir-format">Migrate mailboxes (Maildir format)</a></li>
<li><a href="#migrate-mlmmj-mailing-lists">Migrate (mlmmj) mailing lists</a></li>
<li><a href="#migrate-roundcube-webmail-data">Migrate Roundcube webmail data</a></li>
@ -100,7 +103,7 @@ please update your mail client applications to use TLS connection.</p>
all required changes.</li>
<li>Here are all <a href="https://docs.iredmail.org/iredmail.releases.html">upgrade tutorials for iRedMail</a>.</li>
</ul>
<h2 id="mysqlpostgresql-migrate-mail-accounts">MySQL/PostgreSQL: Migrate mail accounts</h2>
<h2 id="mysqlmariadbpostgresql-migrate-mail-accounts">MySQL/MariaDB/PostgreSQL: Migrate mail accounts</h2>
<p>All mail accounts are stored in database <code>vmail</code>.</p>
<ul>
<li>
@ -116,6 +119,24 @@ please update your mail client applications to use TLS connection.</p>
server. Check <a href="./iredmail.releases.html">upgrade tutorials for iRedMail</a>.</p>
</li>
</ul>
<h3 id="mysqlmariadb-inside-freebsd-jail">MySQL/MariaDB inside FreeBSD Jail</h3>
<p>If you run iRedMail server in a jailed FreeBSD system, restored SQL database
on new jailed system may have privilege error like this:</p>
<pre><code>ERROR 1449 (HY000): The user specified as a definer ('root'@'10.195.20.1') does not exist
</code></pre>
<p>iRedMail installer created SQL tables (or VIEWs, TRIGGERs) as <code>root@10.195.20.1</code>
(<code>10.195.20.1</code> was private IP address of your old Jail system), but this
address was gone on new jailed system. You must replace old IP address by the
new one, fix it with SQL commands below as SQL root user:</p>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>Replace <code>&lt;NEW-IP&gt;</code> by the real private IP address of your jailed system.</p>
</div>
<pre><code>USE mysql;
UPDATE mysql.proc SET definer = 'root@&lt;NEW-IP&gt;' WHERE definer='root@10.195.20.1';
</code></pre>
<h2 id="migrate-mailboxes-maildir-format">Migrate mailboxes (Maildir format)</h2>
<div class="admonition warning">
<p class="admonition-title">Warning</p>