ZCA Migration: Difference between revisions
No edit summary |
No edit summary |
||
Line 177: | Line 177: | ||
== Upgrading from ZCA 8.0.x to Zimbra Collaboration 8.0.9 == | == 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: | |||
[[File:Zimbra-zcatozcs-001.png|750px|thumb|left|ZCA 8.0.x to ZCS 8.0.x]] | [[File:Zimbra-zcatozcs-001.png|750px|thumb|left|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 proccess: | The new versions of Zimbra Collaboration have some pre-requisites that we need to install before start the Upgrade proccess: | ||
root@zimbra-appliance01:~# apt-get install pax libaio1 | root@zimbra-appliance01:~# apt-get install pax libaio1 |
Revision as of 16:31, 13 December 2014

Zimbra Collaboration Appliance migration 6 to ZCS 7 or 8
Lifecyle of Zimbra Collaboration Appliance (ZCA)
Here we can find the Lifecyle of Zimbra Collaboration Appliance:
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
- Enable CLI access to ZCA
- Log into the console as the vmware user
- sudo ufw disable
- 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
- Save the file and re-enable the firewall
- sudo ufw enable
- Log into the console as the vmware user
Download the latest ZCS version
- Download ZCS version from Zimbra. For example:
Remove Unnecessary File
- Log into the virtual appliance console as the vmware user.
- Switch to the zimbra user
- sudo su - zimbra
- Stop the Zimbra Appliance
- zmcontrol stop
- Change directories to /opt/zimbra/conf/rights/
- Delete the following file:
- rm zimbra-rights-appliance-admin.xml
- To return to root, type
- exit
Upgrade your ZCA software.
- 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).
- Gather migration data
- Log into the virtual appliance console as the vmware user
- Switch to the zimbra user
- sudo su - zimbra
- 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
- Exit the zimbra user shell
- exit
- Enable CLI access to ZCA
- Log into the console as the vmware user
- sudo ufw disable
- 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
- Save the file and reenable the firewall
- sudo ufw enable
- Log into the console as the vmware user
- Switch back to the zimbra user
- sudo su - zimbra
- 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.
- Perform a full backup of ZCA.
- zmbackup -a all -f
- full-20120224.231618.575
- Stop all ZCA services.
- zmcontrol stop
- Log out of the console
- exit
Copy existing data to the new server
- Copy backup files from ZCA to /opt/zimbra/backup on the new server.
- scp -r root@{zca server}:/opt/zimbra/backup /opt/zimbra/backup
- 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.
- Login to the console of the new server
- Set the hostname
- sudo vi /etc/hostname
- hostname {zca_hostname}
- Configuration the IP address
- sudo vi /etc/network/interfaces
- Restart networking
- /etc/init.d/networking restart
- 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:
- Zimbra LDAP Server. For Domain to create, identify the same default domain as on the old server.
- 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.
- Change any other settings on the new server to match the configuration on the original server.
- 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.
- Switch to the zimbra user
- sudo su - zimbra
- Stop ZCS
- zmcontrol stop
- 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.
- Restore the Directory and configuration data
- zmrestoreldap -lb <latest_label>.
- Note: To find the LDAP session label to restore, type zmrestoreldap –lbs.
- Because some ZCS services are running at this point, type zmconvertctl start. This is required before running zmrestoreoffline.
- Restore your original LDAP password
- zmlocalconfig -f -e zimbra_ldap_password=<password>.
- 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.
- Stop all ZCS services that have been started.
- zmcontrol stop
- Remove any old backup sessions because these sessions are no longer valid.
- rm -rf /opt/zimbra/redolog/* /opt/zimbra/backup/*
- ZCS is now ready to start.
- zmcontrol start.
- 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:
The new versions of Zimbra Collaboration have some pre-requisites that we need to install before start the Upgrade proccess:
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 check about 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 for check the Integrity of your database. Could take more time 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 we will have Zimbra Collaboration 8.0.9 with all of our users, and data:
Upgrading from Ubuntu 10.04 LTS to Ubuntu 12.04 LTS
The newest versions of Zimbra Collaboration, 8.x doesn't support Ubuntu 10.04 LTS anymore, is deprecated, so we nedd to upgrade our Ubuntu 10.04 to 12.04 at least.
We can follow the next 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
Is always a great idea upgrade the Zimbra Collaboration from 8.0.9 to the last version 8.x, you can do it following these steps - Upgrade Zimbra Collaboration 8.0.7 to 8.x - Ubuntu 12.04 LTS