Results 1 to 7 of 7

Thread: Replication of a production server

Hybrid View

  1. #1
    Join Date
    Jul 2012
    Posts
    37
    Rep Power
    3

    Default Replication of a production server

    Hello,

    I'm having problems with creating a replication server from backup (the backup is created just user tar and gzip of a running server).
    Once I extract the archive which is currently ~250 GB, i hate two problems:

    1) the database can't be started since the database files doesn't match the entries of the tables which i'm fixing with moving all ib* files from /opt/zimbra/db/data/ and repair and check the database (with /opt/zimbra/mysql/bin/mysqlcheck)
    2) once 1) is done mysql is able to start but all of the services are started except the mailboxd daemon. Upon executing zmcontrol start as zimbra user, it says that the daemon is running, but still it's failing.

    Below you can see the output of mailboxd log, which says that the database is missing some tables, which i think it's because the backup is created while the server is running. Have in mind that we can't stop the server and make the backup that's why we are backing it up with tar only. Any suggestion will be much appreciated

    Thanks in advance.

    Here is the error from logfile:

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx ception: Table 'zimbra.config' doesn't exist
    Query being executed when exception was thrown:
    SELECT * FROM config


    Which is quite obvious - table zimbra.config doesn't exists but logging into mysql with user zimbra i'm seeing the following:


    mysql> use zimbra
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
    mysql> show tables;
    +-------------------+
    | Tables_in_zimbra |
    +-------------------+
    | config |
    | current_volumes |
    | deleted_account |
    | mailbox |
    | mailbox_metadata |
    | mobile_devices |
    | out_of_office |
    | pending_acl_push |
    | scheduled_task |
    | service_status |
    | table_maintenance |
    | volume |
    +-------------------+
    12 rows in set (0.00 sec)

    mysql> select * from config;
    ERROR 1146 (42S02): Table 'zimbra.config' doesn't exist
    mysql>

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by ymarinov View Post
    I'm having problems with creating a replication server...
    What is a 'replication server'?

    Quote Originally Posted by ymarinov View Post
    ..... from backup (the backup is created just user tar and gzip of a running server).
    That isn't how you move a server to new hardware, did you look at any of the wiki articles (or forum threads) on this topic? What exactly is the point of this exercise?

    BTW, you can't backup a running server using tar and restore it to new hardware and expect it to work - this is never recommended as the ZCS server is not likely to be in a consistent state.
    Last edited by phoenix; 01-31-2013 at 01:36 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Jul 2012
    Posts
    37
    Rep Power
    3

    Default

    with "replication" i meant to replicate already running server on a container in OpenVZ system for testing purposes.

    I can understand that this shouldn't the way we backup but how can i backup the whole mail server while it's running?

    I've just managed to fix the zimbra.config database, but now once a user logs in, another error pop up in the mailboxd log, below it's the exact error. I think that's related with some emails missing from the production server and replicated server..

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx ception: Table 'mboxgroup26.mail_item' doesn't exist

    Query being executed when exception was thrown:
    SELECT mi.id, mi.type, mi.parent_id, mi.folder_id, mi.index_id, mi.imap_id, mi.date, mi.size, mi.locator, mi.blob_digest, mi.unread, mi.flags, mi.tag_names, mi.subject, mi.name, mi.metadata, mi.mod_metadata, mi.change_date, mi.mod_content, mi.uuid FROM mboxgroup26.mail_item AS mi WHERE mailbox_id = 26 AND type IN (1,2,13)

    But the admin panel works just fine. Anyway to fix the tables and the missing files?

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by ymarinov View Post
    I can understand that this shouldn't the way we backup but how can i backup the whole mail server while it's running?
    The simple answer is you can't, for the reason I've stated. How do you backup your mail server currently?

    Quote Originally Posted by ymarinov View Post
    I've just managed to fix the zimbra.config database, but now once a user logs in, another error pop up in the mailboxd log, below it's the exact error. I think that's related with some emails missing from the production server and replicated server..
    There is no point in pursing this path without a correct backup, follow any of the guides in the forums or wiki and restore that. If you don't do that and continue with your current backup then you could hit further problems caused by your backup strategy - you should do it correctly.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    Join Date
    Jul 2012
    Posts
    37
    Rep Power
    3

    Default

    I completely understand all of this, but my superiors said that we can't afford to stop the mail services in order to make the backup (it takes ~30-40 mins on a running server)
    And the problem is that I can't argue with that - and we are using REOBack Backup Solution Project for our backups - once weekly - full, once daily incremental.

    That's it. However, I know that NE supports live backup, but this is again not a solution for us.

  6. #6
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    Quote Originally Posted by ymarinov View Post
    I completely understand all of this, but my superiors said that we can't afford to stop the mail services in order to make the backup (it takes ~30-40 mins on a running server)
    Explain to your managers that doing this will result in a corrupted install and any information/tests of the new server (if indeed you ever get it working) cannot be guaranteed to provide any useful information. Explain to your managers that you'll be wasting more time trying to get this working than the 'lost' 30-40 minutes the server is offline and surely there must be periods when the server is lightly loaded?

    Quote Originally Posted by ymarinov View Post
    And the problem is that I can't argue with that - and we are using REOBack Backup Solution Project for our backups - once weekly - full, once daily incremental.
    Are these backups done on a running server? If they are they're most likely useless as a guarantee for restoring your server to a working state. I'm assuming that you have a disaster recovery plan in place, have you ever done a disaster recovery from one of these backups? If you shutdown the server then have you tried using one of these full backups as a restore for your test machine?

    Quote Originally Posted by ymarinov View Post
    That's it. However, I know that NE supports live backup, but this is again not a solution for us.
    I assume you're using the OSS version then? The 'live backup' on NE is a mailbox backup not the whole server.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. Cloning a Production Server
    By msf004 in forum Administrators
    Replies: 1
    Last Post: 10-03-2012, 03:21 PM
  2. Install Convertd after server is in production
    By jpctx in forum Installation
    Replies: 1
    Last Post: 07-21-2011, 03:44 PM
  3. move to be a production server
    By otac in forum Administrators
    Replies: 0
    Last Post: 10-22-2009, 10:34 PM
  4. Replies: 1
    Last Post: 12-27-2006, 03:30 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
  •