Multi server to single server

Multi server setup to single server setup


   KB 24547        Last updated on 2023-06-18  




0.00
(0 votes)

Problem

Move Zimbra environment from multi server setup to single server setup.

Solution

Notes:

Please take snapshots on every stage.
Verify this procedure in test environment and go with production.
Please be cautious about the names that mentioned here, these are generic so modify as per need.
Just a few steps needs to be ignored/repeat if proxy, mta packages are in the same server, or if multiple mta/proxy servers in the environment.
Regenerate SSL certificates once moved to single server setup.
Let's assume "1 LDAP, 1 MTA, 1 Proxy, 1 Mailbox" in the environment.
Servers list initially: "zmprov -l gas"
ldap.example.com
mta.example.com
proxy.example.com
mailbox.example.com

Steps for ZCS 8.8.15/9

PHASE 1:

Now 1 LDAP, 1 MTA, 1 Proxy, 1 Mailbox in the environment. Install MTA, Proxy, Mailbox packages in the ldap server (ldap.example.com), and terminate Proxy, MTA.

Servers list: "zmprov -l gas"

ldap.example.com
mta.example.com
proxy.example.com
mailbox.example.com

Step 1: Run install.sh, and select MTA, Proxy, Mailbox packages.

Install zimbra-logger [N] y
Install zimbra-mta [N] y
Install zimbra-dnscache [N] y
Install zimbra-store [N] y
Install zimbra-apache [N] y
Install zimbra-spell [N] y
Install zimbra-convertd [N] y
Install zimbra-memcached [N] y
Install zimbra-proxy [N] y

Step 2: Generate proxy configuration, and restart services.

/opt/zimbra/libexec/zmproxyconfig -e -w -o -a 8080:80:8443:443 -x https  -H `zmhostname`
zmcontrol restart

Step 3: Enable mailbox, admin console services.

/opt/zimbra/bin/zmprov -r -m -l ms ldap.example.com  +zimbraServiceEnabled 'service' +zimbraServiceEnabled 'zimbra' +zimbraServiceEnabled 'zimbraAdmin' +zimbraServiceEnabled 'zimlet'
zmcontrol restart

Step 4: If mailbox failed to start with below error [/opt/zimbra/log/zmmailboxd.out]

[Error]: MultiException[java.lang.IllegalStateException: /opt/zimbra/mailboxd/etc/keystore is not a valid keystore

then copy keystore to mailboxd. Note: After installation complete reinstall SSL certificates.

cp /opt/zimbra/conf/keystore /opt/zimbra/mailboxd/etc/

Step 5: Restart services, make sure all the services started fine.

zmcontrol restart

Step 6: Make sure proxy packages installed.

zmprov -l gas proxy
zmprov -l gamcs

Step 7: Set LDAP host (which keeping as single server) as the SMTP host in global/server/domain level. Note: Modify this if it's pointing to old server (that is being deleted).

Get:

zmprov gcf zimbraSmtpHostname
zmprov gs `zmhostname` zimbraSmtpHostname            # Run against all the servers
zmprov gd example.com zimbraSmtpHostname             # Run against all the domains

Set:

zmprov mcf zimbraSmtpHostname ldap.example.com
zmprov ms `zmhostname` zimbraSmtpHostname ldap.example.com
zmprov md example.com zimbraSmtpHostname ldap.example.com

Step 8: Stop services in MTA, Proxy (mta.example.com, proxy.example.com), and delete servers from the environment.

zmcontrol stop                # Run in MTA, Proxy servers
zmprov ds mta.example.com     # Run in ldap.example.com
zmprov ds proxy.example.com   # Run in ldap.example.com

Notes: If mta, proxy packages are in single server then run these commands in that server. If multiple MTA, Proxy servers in the environment repeate this step in all the MTA, Proxy servers.

Step 9: Make sure MTA, Proxy servers are removed from the environment.

zmprov -l gas proxy
zmprov -l gas mta
zmprov -l gamcs
PHASE 2:

Move mailboxes to ldap.example.com from mailbox.example.com, and delete mailbox from the environment.

Servers list: Since mta.example.com, and proxy.example.com terminated two servers left in the environment.

ldap.example.com
mailbox.example.com

Step 1: If NG modules enabled on old mailbox servers, then enable the same here in ldap.example.com.

Get

zmprov -l gs mailbox.example.com | grep NG

Set:

zmprov ms ldap.example.com zimbraNetworkAdminNGEnabled TRUE zimbraNetworkMobileNGEnabled TRUE zimbraNetworkModulesNGEnabled TRUE
zmcontrol restart

Step 2: Login admin console of ldap.example.com, and check NG modules tab, if not displaying then reinstall NG packages.

[RHEL]
yum reinstall zimbra-network-modules-ng

[Ubuntu]
apt reinstall zimbra-network-modules-ng

zmcontrol restart

Step 3: Reverify NG tab in the admin console.

Step 4: Verify for the disk space, and add more disks to move user accounts, backup. Create primary/secondary HSM volumes based on the need, and add disk for backup as well. Ref: Zimbra NG HSM Volume Management

Step 5: Check and enable NG backup.

Get: zxsuite backup getBackupInfo

Set: zxsuite backup doSmartScan start

Step 6: Remove if any galsync accounts exist in the server that being deleted. Ref: Remove Gal Account

Step 7: Move all the accounts from mailbox.example.com to ldap.example.com. Run command in mailbox.example.com. zxsuite hsm doMailboxMove ldap.example.com domains example.com,example1.com,domain.com stages account,data

Step 8: Make sure all the accounts moved successfully.

Step 9: Stop services in mailbox, and delete the server from the environment.

zmcontrol stop
zmprov ds mailbox.example.com            # Run in ldap.example.com
PHASE 3:

Now it's single server setup. In this phase reverify configuration, backup, GAL..etc. Servers list: Since mta.example.com, proxy.example.com, and mailbox.example.com terminated only one server in the environment.

ldap.example.com

Step 1: Check backup status

[If NG backup enabled]
zxsuite backup getBackupInfo

[If Legacy backup enabled]
zmbackupquery -q

Step 2: Make sure GAL accounts are fine. zimbraId of the gal and zimbraGalAccountId of the domain must be identical.

Get all gal accounts: zmprov -l gaa | grep -i gal

Get id of the GAL account: zmprov ga gal@example.com zimbraId

Get the GAL id of the respective domain: zmprov gd example.com zimbraGalAccountId

Ref: Create/Remove GAL Account

Step 3: Delete entries of the terminated servers from logger hostmap.

Get: :

zmloggerhostmap

Set: :

zmloggerhostmap -d <entry of the host>

Example: zmloggerhostmap -d mailbox mailbox.example.com

Step 4: Verify services status in the admin console.

Step 5: Verify send/receive emails

Steps for ZCS 10:

PHASE 1:

Check PHASE-1 steps of ZCS 8.8.15/9

PHASE 2:

Move mailboxes to ldap.example.com from mailbox.example.com, and delete mailbox from the environment.

Servers list: "zmprov -l gas" Since mta.example.com, and proxy.example.com terminated two servers left in the environment.

ldap.example.com
mailbox.example.com

Step 1: Verify for the disk space, and add more disks based on the need.

Step-2: Check and enable default backup.

Get:

zmschedulebackup

Set:

zmschedulebackup -D

Step 3: Take backup of all the accounts in mailbox.example.com, and move backup to any external location.

zmbackup -f -a all

Step 4: Remove if any galsync accounts exist in the server that being delete.

Ref: Create/Remove GAL Account

Step 5: Move all the accounts from mailbox.example.com to ldap.example.com. Run command in mailbox.example.com.

zmmboxmove -a user@example.com -f mailbox.example.com -t ldap.example.com sync

Ref: Move Accounts Between Mailbox Servers

Step 6: Make sure all the accounts moved successfully.

Step 7: Stop services in mailbox, and delete the server from the environment.

zmcontrol stop
zmprov ds mailbox.example.com            # Run in ldap.example.com
PHASE 3:

Check PHASE-3 steps of ZCS 8.8.15/9


Submitted by: Raghu Noti
Verified Against: ZCS 8.8.15, ZCS 9, ZCS 10 Date Created: 2023-06-18
Article ID: https://wiki.zimbra.com/index.php?title=Multi_server_to_single_server Date Modified: 2023-06-18



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search