ZCA Migration

Zimbra Collaboration Appliance migration 6 to ZCS 7 or 8

   KB 20376        Last updated on 2016-01-27  




0.00
(0 votes)

Lifecyle of Zimbra Collaboration Appliance (ZCA)

Here we can find the Lifecyle of Zimbra Collaboration Appliance:

Lifecyle of Zimbra Collaboration Appliance

Overview

Note: If you are running Zimbra Collaboration Appliance 8.0.x, please go to the section Upgrading from ZCA 8.0.x to Zimbra Collaboration 8.x

There are two choices when upgrading from Zimbra Collaboration Appliance Version 6 to Zimbra Collaboration Server Version 7.

  • One option is to maintain your existing virtual machine and upgrade the Zimbra software in place.
  • The other option is to migrate your data from ZCA to a new server and then perform a ZCS upgrade.

Upgrade in-place Summary

Migration Summary

Upgrade in-place steps

Prepare ZCA for upgrade

  1. Enable CLI access to ZCA
    1. Log into the console as the vmware user
      sudo ufw disable
    2. Update the firewall rules
      • Open the firewall rules in an editor
      sudo vi /var/lib/ufw/user.rules
      • Add a line under "### RULES ###"
      -A ufw-user-input -p tcp --dport 22 -j ACCEPT
    3. Save the file and re-enable the firewall
      sudo ufw enable

Download the latest ZCS version

  1. Download ZCS version from Zimbra. For example:
    wget http://files2.zimbra.com/downloads/7.2.5_GA/zcs-NETWORK-7.2.5_GA_2906.UBUNTU8_64.20130911101145.tgz

Remove Unnecessary File

  1. Log into the virtual appliance console as the vmware user.
  2. Switch to the zimbra user
    sudo su - zimbra
  3. Stop the Zimbra Appliance
    zmcontrol stop
  4. Change directories to /opt/zimbra/conf/rights/
  5. Delete the following file:
    rm zimbra-rights-appliance-admin.xml
  6. To return to root, type
    exit

Upgrade your ZCA software.

  1. Upgrade your software via the Zimbra Collaboration Installation and Upgrade Guide
    tar xzvf zcs-NETWORK-7.2.5_GA_2906.UBUNTU8_64.20130911101145.tgz
    cd zcs-NETWORK-7.2.5_GA_2906.UBUNTU8_64.20130911101145
    ./install.sh

Migration Steps

In the event that you need to migrate from a virtualized Zimbra Collaboration Appliance to a native installation of Zimbra Collaboration Server this document will guide you through the steps. The migration steps include advanced linux administration skills including access to the command line interface (cli), network ip address configuration, firewall configuration, and transferring data between servers. These steps utilize the application level backup and restore functionality built into Network Edition of ZCS because of this migration from ZCA to the Community Edition of ZCS is not supported.

Prepare ZCA for migration.

The migration from the Zimbra Collaboration Appliance (ZCA) utilizes the built-in application backup and restore functionality. This functionally is not exposed in the Administration Console for ZCA and requires access to the command line interface (cli).

  1. Gather migration data
    1. Log into the virtual appliance console as the vmware user
    2. Switch to the zimbra user
      sudo su - zimbra
    3. Obtain and save password information for later use.
      zmlocalconfig -s ldap_postfix_password
      zmlocalconfig -s ldap_amavis_password
      zmlocalconfig -s ldap_root_password
      zmlocalconfig -s zimbra_ldap_password
    4. Exit the zimbra user shell
      exit
  2. Enable CLI access to ZCA
    1. Log into the console as the vmware user
      sudo ufw disable
    2. Update the firewall rules
      • Open the firewall rules in an editor
      sudo vi /var/lib/ufw/user.rules
      • Add a line under "### RULES ###"
      -A ufw-user-input -p tcp --dport 22 -j ACCEPT
      • Enable firewall rules to block end-user access to ZCA.
      Comment out all other ufw-user-input rules
    3. Save the file and reenable the firewall
      sudo ufw enable
  3. Switch back to the zimbra user
    sudo su - zimbra
  4. Verify the mail queue is empty.
    postqueue -p
    Mail queue is empty
    • In the event there are deferred messages in the mail queue you can attempt to flush the queue
    postqueue -f
    • Any remaining messages will be lost.
  5. Perform a full backup of ZCA.
    zmbackup -a all -f
    full-20120224.231618.575
  6. Stop all ZCA services.
    zmcontrol stop
  7. Log out of the console
    exit

Copy existing data to the new server

  1. Copy backup files from ZCA to /opt/zimbra/backup on the new server.
    scp -r root@{zca server}:/opt/zimbra/backup /opt/zimbra/backup
  2. Copy your existing license file to the new server.
    scp -r root@{zca_server}:/opt/zimbra/conf/ZCSLicense.xml .

Shutdown the existing Zimbra Collaboration Appliance

Power off the VM via vSphere or other management console.

Prepare the new ZCS server

Before you begin, make sure that the new server is correctly configured with the IP address and hostname and that ZCS is installed and configured with the same domain, hostname, passwords, etc. as the previous server. See the Zimbra Collaboration Server installation guide for more information about preparing the server. Before you begin to install ZCS, note the information you need from the old server including: admin account name and password, LDAP, Amavis, and Postfix passwords, spam training and non-spam training user account names, exact domain name, and the global document account name.

  1. Login to the console of the new server
  2. Set the hostname
    sudo vi /etc/hostname
    hostname {zca_hostname}
  3. Configuration the IP address
    sudo vi /etc/network/interfaces
  4. Restart networking
    /etc/init.d/networking restart
  5. Install software per the ZCS Installation Guide
    ./install.sh -l ../ZCSLicense.xml
    Run ./install.sh and follow the directions in the installation guide to install ZCS. Make sure that you configure the same domain, hostname, passwords as on the original server. During ZCS install, the following settings must be changed to match the original server settings:
    1. Zimbra LDAP Server. For Domain to create, identify the same default domain as on the old server.
    2. Zimbra Mailbox Server. An administrator’s account is automatically created.
      • Make sure that the account name for Admin user to create is the same name as on the original server.
      • Set the admin password to be the same as on the old server.
      • Set the LDAP password to be the same as on the old server.
      • Set the Postfix user and Amavis user passwords to be the same as on the old server
      • Change the Spam training user and the Non-spam (HAM) training user account names to be the same as the spam account names on the old server.
      • Global Document Account – This account name is automatically generated and is usually named wiki. If you changed this, change the Global Document Account name to be the same account name as on the original server.
    3. Change any other settings on the new server to match the configuration on the original server.
    4. In the main menu, set the default backup schedule and the automatic starting of servers after the configuration is complete to NO.

Restore system configuration and account data.

  1. Switch to the zimbra user
    sudo su - zimbra
  2. Stop ZCS
    zmcontrol stop
  3. Delete the MySQL data and re-initialize an empty data directory. If you do not do this, zmrestoreoffline will have errors.
    rm -rf /opt/zimbra/db/data/*
    /opt/zimbra/libexec/zmmyinit
    The MySQL service is now running.
  4. Restore the Directory and configuration data
    zmrestoreldap -lb <latest_label>.
    Note: To find the LDAP session label to restore, type zmrestoreldap –lbs.
  5. Because some ZCS services are running at this point, type zmconvertctl start. This is required before running zmrestoreoffline.
  6. Restore your original LDAP password
    zmlocalconfig -f -e zimbra_ldap_password=<password>.
  7. To start the offline restore, type
    zmrestoreoffline -sys -a all -c -br.
    You may want to run a command such as nohup here also. To watch the progress, tail /opt/zimbra/log/mailbox.log.
    Note: Use –c on the command line so that accounts will be restored even if some accounts encounter errors during the offline restore process.
  8. Stop all ZCS services that have been started.
    zmcontrol stop
  9. Remove any old backup sessions because these sessions are no longer valid.
    rm -rf /opt/zimbra/redolog/* /opt/zimbra/backup/*
  10. ZCS is now ready to start.
    zmcontrol start.
  11. Now run a full backup
    zmbackup -f -a all.

Upgrading from ZCA 8.0.x to Zimbra Collaboration 8.x

Note:

  • All ZCA versions up to ZCA 8.0.4 are supported for the upgrade.
  • Upgrading ZCA to ZCS is not available using versions of ZCS prior to ZCS 8.0.6

Upgrading from ZCA 8.0.x to Zimbra Collaboration 8.0.9

Log into the virtual appliance console as the root user. Switch to the zimbra user. You can do it trough VMware Console in your vSphere, or trough a SSH Client. You will see something like this:

   Linux zimbra-appliance01.zimbralab.local 2.6.32-41-generic #88-Ubuntu SMP Thu Mar 29 13:10:32 UTC 2012 x86_64 GNU/Linux
   Ubuntu 10.04.4 LTS
   Welcome to Ubuntu!
   * Documentation:  https://help.ubuntu.com/
   Last login: Fri Dec 12 22:34:23 2014 from 192.168.211.1
   root@zimbra-appliance01:~#

Once you are logged, run the next commands to see the exact version of ZCA that you have:

   root@zimbra-appliance01:~# su zimbra
   zimbra@zimbra-appliance01:/root$ zmcontrol -v
   ZCA Release zca-8.0.4.1151542
   ZCS Build 8.0.4.GA.5737.UBUNTU10.64 NETWORK edition.

We can see also some information in the Admin Console (https://ZIMBRAAPPLIANCEIP:7071) and check our version of ZCA:

ZCA 8.0.x to ZCS 8.0.x

The new versions of Zimbra Collaboration have some pre-requisites that we need to install before start the Upgrade process:

   root@zimbra-appliance01:~# apt-get install pax libaio1

Also, run a full backup is always a must:

   zimbra@zimbra-appliance01:/$ zmbackup -f -a all

Then, launch the ./install.sh script ./install.sh

Operations logged to /tmp/install.log.17327

   Checking for existing installation...
    zimbra-ldap...FOUND zimbra-ldap-8.0.4.GA.5737.UBUNTU10.64
    zimbra-logger...FOUND zimbra-logger-8.0.4.GA.5737.UBUNTU10.64
    zimbra-mta...FOUND zimbra-mta-8.0.4.GA.5737.UBUNTU10.64
    zimbra-snmp...FOUND zimbra-snmp-8.0.4.GA.5737.UBUNTU10.64
    zimbra-store...FOUND zimbra-store-8.0.4.GA.5737.UBUNTU10.64
    zimbra-apache...FOUND zimbra-apache-8.0.4.GA.5737.UBUNTU10.64
    zimbra-spell...FOUND zimbra-spell-8.0.4.GA.5737.UBUNTU10.64
    zimbra-convertd...FOUND zimbra-convertd-8.0.4.GA.5737.UBUNTU10.64
    zimbra-memcached...FOUND zimbra-memcached-8.0.4.GA.5737.UBUNTU10.64
    zimbra-proxy...NOT FOUND
    zimbra-archiving...FOUND zimbra-archiving-8.0.4.GA.5737.UBUNTU10.64
    zimbra-cluster...NOT FOUND
    zimbra-core...FOUND zimbra-core-8.0.4.GA.5737.UBUNTU10.64
   ZCS upgrade from 8.0.4 to 8.0.9 will be performed.
   Checking for available license file...
   Current Users=105 Licensed Users=10000
   Saving existing configuration file to /opt/zimbra/.saveconfig

Reply yes to the three questions about License, once read it:

   Do you agree with the terms of the software license agreement? [N] y

The system will check for all the pre-requisites and the last backup:

   Checking for prerequisites...
    FOUND: NPTL
    FOUND: netcat-openbsd-1.89-3ubuntu2
    FOUND: sudo-1.7.2p1-1ubuntu5.3
    FOUND: libidn11-1.15-2
    FOUND: libpcre3-7.8-3build1
    FOUND: libgmp3c2-2:4.3.2+dfsg-1ubuntu1
    FOUND: libexpat1-2.0.1-7ubuntu1
    FOUND: libstdc++6-4.4.3-4ubuntu5.1
    FOUND: libperl5.10-5.10.1-8ubuntu2.1
    FOUND: libaio1-0.3.107-3ubuntu2
   Checking for suggested prerequisites...
    FOUND: pax
    FOUND: perl-5.10.1
    FOUND: sysstat
    FOUND: sqlite3
   Prerequisite check complete.
   Checking current number of databases...
   Checking for a recent backup

In the database integrity, reply yes to check the integrity of your database. Could take some more time, it depends on the database size:

   Do you want to verify message store database integrity? [Y] 
   Verifying integrity of message store databases.  This may take a while.
   mysqld is alive
   No errors found

The system will ask us about if we are sure to upgrade, press Yes:

   Do you wish to upgrade? [Y] 
   Select the packages to install
   Upgrading zimbra-core
   Upgrading zimbra-ldap
   Upgrading zimbra-logger
   Upgrading zimbra-mta
   Upgrading zimbra-snmp
   Upgrading zimbra-store
   Upgrading zimbra-apache
   Upgrading zimbra-spell
   Upgrading zimbra-convertd
   Upgrading zimbra-memcached

If we didn't had the proxy package installed, then here select No:

   Install zimbra-proxy [N] 

Then the system will ask us again, if we are sure, press Yes:

   The system will be modified.  Continue? [N] y

And then, after a while, the upgrade system will finish:

   Restarting mailboxd...done.
   Skipping creation of default domain GAL sync account - existing install detected.
   Setting up zimbra crontab...done.
   Moving /tmp/zmsetup.12132014-134053.log to /opt/zimbra/log
   Configuration complete - press return to exit

And finally, we are now in Zimbra Collaboration 8.0.9, so we can run the next commands to confirm:

   root@zimbra-appliance01:~# su zimbra
   zimbra@zimbra-appliance01:/root$ zmcontrol -v
   Release 8.0.9.GA.6191.UBUNTU10.64 UBUNTU10_64 NETWORK edition.

And we will have Zimbra Collaboration 8.0.9 with all of our users, and data:

ZCA 8.0.x to ZCS 8.0.x

Migrating from ZCS to ZCS

Once we've migrated our Zimbra Appliance from ZCA to Zimbra Collaboration, maybe we want to migrate it to another VM, or physical machine, with better partitioning, different resources, etc. For this case, we will need to follow the next Wiki to migrate between servers. Ajcody-Notes-Server-Move

Upgrading from Ubuntu 10.04 LTS to Ubuntu 12.04 LTS

The newest versions of Zimbra Collaboration (8.5.x/8.6.x) don't support Ubuntu 10.04 LTS anymore, so you will need to upgrade from 10.04 LTS to 12.04 or more if you plan to upgrade in the near future.

Please follow the wiki for the Ubuntu 10.04 to 12.04 Upgrade - Ubuntu 10.04 to 12.04 Upgrade

Upgrading from Zimbra Collaboration 8.0.9 to 8.5.1 in Ubuntu 12.04 LTS

It's always a great idea to upgrade Zimbra Collaboration from 8.0.9 to the latest version 8.5.x. You can do it following these steps - Upgrade Zimbra Collaboration 8.0.7 to 8.x - Ubuntu 12.04 LTS


Verified Against: ZCA 7, ZCA 8.0.x to ZCS 8.0.x Date Created: 10/09/2012
Article ID: https://wiki.zimbra.com/index.php?title=ZCA_Migration Date Modified: 2016-01-27



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