Difference between revisions of "How to move ZCS to another server"

(How to move ZCS to another server)
(How to move ZCS to another server)
Line 20: Line 20:
 
3. $ exit
 
3. $ exit
 
4. Make sure all zimbra services are stopped: # ps aux | grep zimbra  
 
4. Make sure all zimbra services are stopped: # ps aux | grep zimbra  
5. Now, you can copy the /opt/zimbra directory to another backup location, and from there to copy it to the destination server, or you could mount external disc and copy it there.  
+
5. Now, you can copy the /opt/zimbra directory to another backup location, and from there to copy it to the destination server later, or you could mount external disc and copy it there, or simply copy it to the destination server (if already installed with the correct OS).
4. As root user, copy it to the remote mashine:
+
6. As root user, copy it to the remote machine:
# rsync -e ssh -axvzKHS  /opt/zimbra/ 10.0.0.1:/opt/zimbra/
+
# rsync -e ssh -axvzKHS  /opt/zimbra/ 10.0.0.1:/tmp
 +
- that command will copy /opt/zimbra directory to a remote machine with IP 10.0.0.1, in the /tmp directory (using ssh). 
  
 
or to a local mounted disk:
 
or to a local mounted disk:
# rsync -avH /opt/zimbra /mnt/zimbra_backup
+
# rsync -axvzKHS /opt/zimbra /mnt/zimbra_backup
 
+
8. Install a new server, with supported Operating System for the zcs version.
 +
9. Turn off the old ZCS Server
 +
10. Set up the new ZCS Server:
 +
-change the hostname as the old server
 +
-change the network settings as the old server
 +
11. Download the version of ZCS on the new server.
 +
12. As root, run the installer with the -s option: ./install.sh -s
 +
13. When the install -s completes, you can delete the /opt/zimbra directory. rm -rf /opt/zimbra
 +
14. Now, copy the /opt/zimbra directory backup we made in step 5, to the new server in /opt directory, so that the structure is the same: /opt/zimbra. If you have copied it to a different server, just rsync it to the new server. If you used external disk, mount it and as root rsync your backup to the new location: rsync -avH /mnt/zimbra_backup /zimbra /opt/.
 +
14. As root run:
 +
/opt/zimbra/libexec/zmfixperms -e -v
 +
15. As root rerun the installer without the -s option: ./install.sh
  
  

Revision as of 09:28, 28 September 2016

How to move ZCS to another server

   KB 23043        Last updated on 2016-09-28  




0.00
(0 votes)


Problem

In this article, we will explain how to move/migrate a zimbra server to another machine.


Prerequisites

Both the source and destination zimbra servers must be running the same version. E.g. if source is running 8.6, the installed zimbra on the destination must be also 8.6.

Resolution

Below are the steps that needs to be taken, to complete the migration:

1. # su - zimbra 2. $ zmcontrol stop 3. $ exit 4. Make sure all zimbra services are stopped: # ps aux | grep zimbra 5. Now, you can copy the /opt/zimbra directory to another backup location, and from there to copy it to the destination server later, or you could mount external disc and copy it there, or simply copy it to the destination server (if already installed with the correct OS). 6. As root user, copy it to the remote machine:

  1. rsync -e ssh -axvzKHS /opt/zimbra/ 10.0.0.1:/tmp

- that command will copy /opt/zimbra directory to a remote machine with IP 10.0.0.1, in the /tmp directory (using ssh).

or to a local mounted disk:

  1. rsync -axvzKHS /opt/zimbra /mnt/zimbra_backup

8. Install a new server, with supported Operating System for the zcs version. 9. Turn off the old ZCS Server 10. Set up the new ZCS Server: -change the hostname as the old server -change the network settings as the old server 11. Download the version of ZCS on the new server. 12. As root, run the installer with the -s option: ./install.sh -s 13. When the install -s completes, you can delete the /opt/zimbra directory. rm -rf /opt/zimbra 14. Now, copy the /opt/zimbra directory backup we made in step 5, to the new server in /opt directory, so that the structure is the same: /opt/zimbra. If you have copied it to a different server, just rsync it to the new server. If you used external disk, mount it and as root rsync your backup to the new location: rsync -avH /mnt/zimbra_backup /zimbra /opt/. 14. As root run: /opt/zimbra/libexec/zmfixperms -e -v 15. As root rerun the installer without the -s option: ./install.sh


Additional Content

Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 28/09/2016
Article ID: https://wiki.zimbra.com/index.php?title=How_to_move_ZCS_to_another_server Date Modified: 2016-09-28



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 »


Wiki/KB reviewed by SME1 SME2 COPY EDITOR Last edit by Teodor Vizirov
Jump to: navigation, search