ZCA Migration

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Zimbra Migration from ZCA 6 to ZCS 7 or 8

Overview

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 VMware. For example:
    wget http://files2.zimbra.com/downloads/7.1.4_GA/zcs-NETWORK-7.1.4_GA_2555.UBUNTU8_64.20120105094735.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.1.4_GA_2555.UBUNTU8_64.20120105094735.tgz
    cd zcs-NETWORK-7.1.4_GA_2555
    ./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 VMware 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.
Jump to: navigation, search