Difference between revisions of "Moving ZCS to New Server"

(Reformatting headers, forcing TOC, adding note re: version, and adding link to zmrestore article)
m (Method For Network Edition Customers: reformatting)
Line 14: Line 14:
 
* Copy /opt/zimbra/backup directory from the old server to the new server in the same location.
 
* Copy /opt/zimbra/backup directory from the old server to the new server in the same location.
 
* Now restore the data on new server using "zmrestore" command as follows:
 
* Now restore the data on new server using "zmrestore" command as follows:
    $ zmrestoreldap -lb <label> ( Label of latest full backup )
 
    If you are restoring large number of accounts, you may want to run this command with nohup so that the session does not terminate. (Observe whether the LDAP server is started
 
    successfully after the restore, it must be running for the next steps).
 
    <u>Note</u>: To find the LDAP session label to restore, type zmrestoreldap –lbs.
 
  
    $ zmrestore -sys -ra -a all -c
+
$ zmrestoreldap -lb <label> ( Label of latest full backup )
  
    After issuing this command the data will get restored properly and if any error occurs it will be prompted after the process is completed.
+
If you are restoring large number of accounts, you may want to run this command with nohup so that the session does not terminate. (Observe whether the LDAP server is started successfully after the restore, it must be running for the next steps).
    You will get an notification that admin and wiki accounts are not restore, which you have to restore manually after this, as follows:
 
    $ zmrestore -a admin@yourdomain.com
 
    $ zmrestore -a wiki@yourdomain.com
 
  
 +
'''''Note:''' To find the LDAP session label to restore, type '''zmrestoreldap –lbs'''.''
 +
 +
$ zmrestore -sys -ra -a all -c
 +
 +
After issuing this command the data will get restored properly and if any error occurs it will be prompted after the process is completed.
 +
 +
You will get an notification that admin and wiki accounts are not restore, which you have to restore manually after this, as follows:
 +
 +
$ zmrestore -a admin@yourdomain.com
 +
$ zmrestore -a wiki@yourdomain.com
  
 
=Method For Open Source Edition Users=
 
=Method For Open Source Edition Users=

Revision as of 21:00, 7 December 2009

This article contains two ways to move ZCS setup from your existing server to new server.

Note: This article appears to be written for ZCS 5.0 and may not be applicable to earlier or later versions of ZCS. Additionally, for Network Edition customers, there have been updates to the zmrestore command in ZCS 6.0. To find out more about these updates, see CLI zmrestore Network Edition only.


Method For Network Edition Customers

If you are moving to new server and have latest backup with you then you should follow these steps:

  • Install a new server. Keep the "hostname" and "zmhostname" same as old server.
  • Take a latest full backup and after taking a full backup also take a incremental backup in your current running server. Running an incremental backup will copy the redologs and the backup will be up to date.
  • Install the same version of ZCS which is running on your current system.
  • Copy /opt/zimbra/backup directory from the old server to the new server in the same location.
  • Now restore the data on new server using "zmrestore" command as follows:
$ zmrestoreldap -lb <label> ( Label of latest full backup )

If you are restoring large number of accounts, you may want to run this command with nohup so that the session does not terminate. (Observe whether the LDAP server is started successfully after the restore, it must be running for the next steps).

Note: To find the LDAP session label to restore, type zmrestoreldap –lbs.

$ zmrestore -sys -ra -a all -c

After issuing this command the data will get restored properly and if any error occurs it will be prompted after the process is completed.

You will get an notification that admin and wiki accounts are not restore, which you have to restore manually after this, as follows:

$ zmrestore -a admin@yourdomain.com
$ zmrestore -a wiki@yourdomain.com

Method For Open Source Edition Users

Second method which you can follow is using rsync command, here are the steps:

If and only if the Operating System is going to be same on both old and new server:

  • Stop your existing ZCS using "zmcontrol stop".
  • Check if no zimbra process is running if so kill that process.
  • Do a cold and offline backup of /opt/zimbra directory using rsync command:
   # rsync -avHK /opt/zimbra /opt/zimbra.bak
  • Copy the zimbra.bak file to the new server. (Please see Talk:Moving_ZCS_to_New_Server)
  • On new server, install the same version of ZCS and Keep the "hostname" and "zmhostname" same as old server.
  • Stop ZCS on new server using "zmcontrol stop".
  • Remove the complete zimbra directory:
   # rm -rf /opt/zimbra
  • Restore from cold backup using rsync command:
   # rsync -avHK /opt/zimbra.bak /opt/zimbra


Verified Against: unknown Date Created: 2/29/2008
Article ID: https://wiki.zimbra.com/index.php?title=Moving_ZCS_to_New_Server Date Modified: 2009-12-07



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