Server Migration
Results 1 to 8 of 8

Thread: Server Migration

  1. #1
    Active Member
    Join Date
    Feb 2014
    Posts
    4

    Question Server Migration

    Hello happy people,

    we are currently evaluating ZxBackup (or rather the whole suite) as a solution for both backup and desaster recovery.

    The first test and failure on our end, I suspect is using ZxBackup to do a server migration.

    On the old server we installed ZxSuite and ran the initial backup, transfered the data to the new server and tried to `doExternalRestore`. This didn't do much on the new server…

    As the old server needs to run in parallel we are unable to recreate the exact configuration (as is described here: Zx Backup: Disaster Recovery - ZeXtras Suite Wiki ).
    As such, MX records for instance shouldn't point to this new server, not even low prio ones. Not until we are sure that we can replace the old server with this new one.

    Zimbra's diffuse configuration also makes it tricky to migrate the configuration, which is spread across files, ldap, mysql(?). And then there's certificates…
    I would rather avoid an innitial rsync just to guarantee a consistent configuration, since that would be in the order of 25G.

    Do you have any other suggestions of how to do a base-setup + configuration prior to a restore?
    Even if it does involve multiple steps, that's okay if it's easily automatable.

    Thank you very much in

  2. #2
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,363
    Hello igalic,
    welcome to the forums!

    My suggestion is to set up an Active/Passive setup following this steps:
    - Create a new VM with the same hostname and a different IP Address than the original one.
    - Install Zimbra on it only applying the basic settings.
    - Set up a remote copy of ZeXtras Backup's datastore as described at Taking Additional and Offsite backups of ZxBackup's Datastore - ZeXtras Suite Wiki

    In case of a failure of the main server you can simply import the data to the new one as described on the Disaster Recovery guide you linked, using either the main server's backup path or the remote copy (in case the original backup path is lost or corrupted) as the source. As soon as the restore is started all Domains/COS/Mailboxes are created, so after you receive the "Operation Running" notification you can switch the mailflow to the new server so that new emails will be delivered correctly.

    You will have to manually apply any server configuration and customization, but in order to help you with this ZeXtras Backup comes with a very handy CLI command: `getServerConfig`.

    Code:
    zimbra@test:~$ zxsuite backup getServerConfig
    command getServerConfig requires more parameters
    
    
    Syntax:
       zxsuite backup getServerConfig {standard|customizations} [attr1 value1 [attr2 value2...]]
    
    
    PARAMETER LIST
    
    
    NAME              TYPE               EXPECTED VALUES                       DEFAULT
    type(M)           Multiple choice    standard|customizations               
    date(O)           String             "dd/MM/yyyy HH:mm:ss"|"last"|"all"    
    backup_path(O)    Path                                                     /opt/zimbra/backup/zextras/
    file(O)           String             Path to backup file                   
    query(O)          String             section/id/key                        
    verbose(O)        String                                                   false
    colors(O)         String                                                   false
    
    
    (M) == mandatory parameter, (O) == optional parameter
    
    
    Usage example:
    
    
    zxsuite backup getserverconfig standard date last
     Display the latest backup data for Server and Global configuration.
    zxsuite backup getserverconfig standard file /path/to/backup/file
     Display the contents of a backup file instead of the current server backup.
    zxsuite backup getserverconfig standard date last query zimlets/com_zimbra_ymemoticons colors true verbose true
     Displays all settings for the com_zimbra_ymemoticons zimlet, using colored output and high verbosity.
    Specifically,
    Code:
    zxsuite backup getServerConfig path /your/backup/path/ date last query / | less
    will display the latest backed up configurations.

    You can change the "query" argument to display specific settings, e.g.

    Code:
    zimbra@test:~$ zxsuite backup getServerConfig standard date last backup_path /opt/zimbra/backup/zextras/ query serverConfig/zimbraMailMode/test.domain.com
    
    
    config date_______________________________________________________________________________________________28/02/2014 04:01:14 CET
    test.domain.com____________________________________________________________________________________________________________both
    The {zimbrahome}/conf/ and {zimbrahome}/postfix/conf/ directories are backed up aswell:
    Code:
    zimbra@test:~$ zxsuite backup getServerConfig customizations date last verbose true
    ATTENTION: These files contain the directories {zimbraHome}/conf/ and {zimbraHome}/postfix/conf/ compressed into a single archive.
               Restore can only be performed manually. Do it only if you know what you're doing.
    
    
    
    
            archives                                
    
    
                    filename                                                    customizations_28_02_14#04_01_14.tar.gz
                    path                                                        /opt/zimbra/backup/zextras/server/
                    modify date                                                 28/02/2014 04:01:14 CET
    Have a nice day,
    Cine
    the ZeXtras Team

    p.s.: Added all of this info to the "Disaster Recovery" guide, thank you for giving me the opportunity to elaborate this topic!
    Last edited by Cine; 02-28-2014 at 03:29 PM.

  3. #3
    Active Member
    Join Date
    Feb 2014
    Posts
    4
    Hi Cine,

    I'm currently trying to do the initial migration with the ZeXtras Migraiton tool which I only now discovered.

    In how far does this work differently from the ZeXtras Backup suite?

  4. #4
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,363
    Quote Originally Posted by igalic View Post
    Hi Cine,

    I'm currently trying to do the initial migration with the ZeXtras Migraiton tool which I only now discovered.

    In how far does this work differently from the ZeXtras Backup suite?
    Hello igalic!

    The ZeXtras Migration Tool has been designed for "fire and forget" migrations, while ZeXtras Backup is a complete backup system for Zimbra. Migration-wise, the difference between the two is that the first can only perform one-shot exports, while the latter can be used to perform "Incremental" migrations.
    Because of this, the ZeXtras Migration Tool is less appropriate than ZeXtras Backup for the needs you described in your first post...

    Have a nice day,
    Cine
    the ZeXtras Team

  5. #5
    Active Member
    Join Date
    Feb 2014
    Posts
    4
    Ack. Thanks for the quick response.

    The migration just finished and produced pretty much the same output (visually to me, looking at ls -l /opt/zmigration/ ) as zxbackup did.

    What I don't understand in either case is how to directly apply the configuration/customization from backup…

  6. #6
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,363
    Quote Originally Posted by igalic View Post
    What I don't understand in either case is how to directly apply the configuration/customization from backup…
    Hello igalic!

    Domans, Classes of Service, Distribution Lists, Aliases, Mailboxes and User Preferences will be automatically imported by the "External Restore", while any server/global config or customization must be applied manually.

    Have a nice day,
    Cine
    the ZeXtras Team

  7. #7
    Active Member
    Join Date
    Feb 2014
    Posts
    4
    Hi Cine,

    By applied manually, do you mean to basically just unpack the customizations in /opt/zimbra?

    I'm still not sure how to (automatically) apply the things that getServerConfig returns.

    ~bye, i

  8. #8
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,363
    Quote Originally Posted by igalic View Post
    Hi Cine,

    By applied manually, do you mean to basically just unpack the customizations in /opt/zimbra?

    I'm still not sure how to (automatically) apply the things that getServerConfig returns.

    ~bye, i
    Hello!

    It's not possible to automatically apply those settings/configs: you'll need to manually apply those and only with full awareness about what you are doing, as any error can lead to severe service disruption...

    Have a nice day,
    Cine
    the ZeXtras Team

Bookmarks

Posting Permissions

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