Results 1 to 10 of 10

Thread: Merge two ZCS servers into one

  1. #1
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default Merge two ZCS servers into one

    So lets say there are two ZCS installations, each on it's own hardware and network, with commercial certificate for it's domain. Then lets say we want to merge them together.

    The goal is to move the entire domain from the smaller server, into the more powerful server. Users should notice no change as accessing the server would be just a DNS change.

    Is this a simple thing to do, or should I just give up?

  2. #2
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,374
    Rep Power
    11

    Default

    Hi Dirk,

    If the two domains don't send email to each other and are running the same ZCS version, you could run a test at your leisure:

    Create the domain which is currently domiciled on the smaller server on the bigger server and a mailbox on this newly-created domain which already exists on the smaller server. Export the mailbox from the smaller server to your workstation.

    Configure a virtual host for this domain (e.g. "zmail.small-server-domain.com") on the larger server, and on your local workstation add an entry in your /etc/hosts file to point zmail.small-server-domain.com to the IP address of the bigger server.

    Import the mailbox previously exported from the smaller server into the same-named mailbox on the larger server and test from your local workstation that you can log in properly.

    If it all works, then I would shorten the TTL on the A/MX records for the domain on the smaller server and schedule the downtime necessary to export/import all of the mailboxes.

    How does that sound?

    All the best,
    Mark

    If the two domains do periodically send email to each other then to avoid users on the larger server sending email to the "wrong" mailbox you'll need to run this test at a time of day when the users aren't on the system.

  3. #3
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    That rounds rather like a plan, but what method were you thinking of for the export/import? If from the web client, then I've had issues in the past with that not including quite everything but it's likely working better now; there's only a few accounts, so it's doable.

    Also, that's going to leave all the domain settings down to manual input, so the accounts, aliases etc will need to be referenced and keyed in manually; again, it's not a massive task, but it could be.

    I'll run the test and see how it goes, should be fine though.

  4. #4
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,374
    Rep Power
    11

    Default

    Hi Dirk,

    You can do all this from the command line in several ways, so this can be scripted for large installations. See for example:

    ZCS-to-ZCS Migrations » Zimbra :: Blog

    and

    ZCS 6.0:Zimbra REST API Reference:Export Mailbox - Zimbra :: Wiki

    Keep us posted please as to your progress!

    All the best,
    Mark

  5. #5
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    Well I've moved one of the accounts in, say user@smalldomain.com

    Everything does look to be working correctly, but when I click on a document inside the notebook, I get a permissions error. The URL it's accessing is:
    Code:
    https://mail.largeserver.com/home/user@smalldomain.com/Notebook/Page1
    The error shown is:
    Code:
    HTTP ERROR 403
    
    Problem accessing /service/home/user@smalldomain.com/Notebook/Page1. Reason:
    
        permission denied: you do not have sufficient permissions
    
    Powered by Jetty://

    any idea?

  6. #6
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,322
    Rep Power
    13

    Default

    There's a CLI tool to handle this (zmztozmig iirc).

    However the tool (just like the basic REST commands) just exports each full account then import it: you're loosing all the sharing stuff...

    If you want to keep the sharing stuff, you have to use/script zmmailbox to export the shares and mount points then import them back.

  7. #7
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    Thanks for the pointers so far. I can successfully move an account over and from there it's just a case of DNS changes etc, but I still cant get all of the account.

    Mail, contacts and calendars is fine, but the content of the user notebooks and briefcases is lost. The pointers are there but clicking one of the entries goes to a seemingly missing file. There's no sharing involved, this is for a briefcase on the users own account.

    Before I give up on this and look for a different solution, is there a way to export or migrate the document/briefcase ?

  8. #8
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,322
    Rep Power
    13

    Default

    No document/briefcase with zmztozmig?

    That script (that is able to deal with all the accounts of one domain in one pass) is just a batched and automated REST export then REST import.

    Aren't you getting the document/briefcase with a CLI REST export?

  9. #9
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    I didnt try zmztozmig, I used the REST commands to export the account, the scp the file to the other server, then import the account.

    I first made the domain on the server, and created a user in that domain to import into. I took only the user account.

    Is the content of a users notebook stored inside their account, or inside the wiki@domain.com account? I'll try exporting that account too and see if the links start to work.

  10. #10
    Join Date
    May 2006
    Location
    England.
    Posts
    927
    Rep Power
    10

    Default

    Ok, a quick check show's that not to be the case. The wiki account contained nothing. I've looked inside the tgz file generated by the zmmailbox export command, and the files that should be in the briefcase are there so it looks like either an import issue or a permissions issue.

    Does anyone know how I could go about finding the physical files on the disk to check this? I'm looking around in /opt/zimbra/store at the moment.

Similar Threads

  1. Trouble Sending mail - All Messages deferred!
    By SiteDiscovery in forum Administrators
    Replies: 7
    Last Post: 09-03-2009, 04:52 AM
  2. Mail is being queued, not delivered!
    By icepick94 in forum Administrators
    Replies: 12
    Last Post: 01-22-2009, 06:03 AM
  3. Shared storage and ZCS / load balancing store servers
    By bureado in forum Administrators
    Replies: 0
    Last Post: 08-22-2008, 10:32 PM
  4. ZCS 3.2 Beta Available
    By KevinH in forum Announcements
    Replies: 31
    Last Post: 07-07-2006, 03:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •