Unrestored items after successful migration
Results 1 to 9 of 9

Thread: Unrestored items after successful migration

  1. #1
    Active Member
    Join Date
    Aug 2012
    Posts
    5

    Unrestored items after successful migration

    Hello,
    we have just followed this howto to migrate a 6.0.11 32 bit server to a brand new 7.1.2 64 bit server without problem. But at step where a few mail are missing (the new server is in production) , we tried to import a mailbox, and saw that all mails where imported 2 times ! what are we doing wrong ? maybe because we renamed the server ?

    Thanks and greetings from france.

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

    The import procedure keeps track of imported items by creating different mapfiles as described at ZxBackup Store - ZeXtras Suite Wiki... Did you move/delete any file in the /opt/zimbra/backup/zextras/ folder before retrying the import? Did you change the backup path to a different folder than /opt/zimbra/backup/zextras/?

    Also, what version of ZeXtras Suite are you running?

    Have a nice day,
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  3. #3
    Active Member
    Join Date
    Aug 2012
    Posts
    5
    ok, i found where the problem is.
    When we imported the data, the backup dir was read only.
    So, we have copied this directory ( after the import) to the new server,set is as default backup dir and performed a full scan.

    now, i have the oldserver with the orginal backup
    and the new server with a copy of the backup and 2 map files.

    Do you thnik therz is way to finish the import ?

    Many thanks for your help.

  4. #4
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Hi phig,

    what version of ZeXtras Suite are you using? A strict check on R/W permissions before the import has been introduced in version 1.2.5 so I'd like to figure out if there is a new bug on this matter...

    As per the restore, I'd first check what items have not been restored using the search queries you can find in the "operation ended" notification. Also, check if you had any missing BLOB errors in the mailbox.log/export log, sometimes items who are marked as unrestored are actually nonexistant in the source server.

    [p.s.: Moved to a dedicated thread]
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  5. #5
    Active Member
    Join Date
    Aug 2012
    Posts
    5
    [ps: i thought i was mad, i didn't found the original topic don't make joke on friday! ]

    I Used last version of Zextra suite and Zxetra Migration tool. ( 1.4.0).

    There is nothing missing. all missing item are restored, but existing items also i think that the imported map was missing ( as the source dir was R/O), and now zextra cannot identify which item is imported and which is not.

    If there is no way to sort them up, we w'll save them manually in the original server and import them on the new ( 100+ mailbox, 1 day).

    Many thanks for your support.
    The final customer will buy the commercial version

  6. #6
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Quote Originally Posted by phig View Post
    [ps: i thought i was mad, i didn't found the original topic don't make joke on friday! ]

    I Used last version of Zextra suite and Zxetra Migration tool. ( 1.4.0).

    There is nothing missing. all missing item are restored, but existing items also i think that the imported map was missing ( as the source dir was R/O), and now zextra cannot identify which item is imported and which is not.

    If there is no way to sort them up, we w'll save them manually in the original server and import them on the new ( 100+ mailbox, 1 day).

    Many thanks for your support.
    The final customer will buy the commercial version
    I think I miss the point (friday hits on both sides ), let me get this straight...

    - You exported your data from the source server
    - You imported the data in a brand new server, in which mapfiles have not been saved (as they are saved in the destination server)
    - Some items were missing, so you reimported the data in the destination server. Missing items were imported but existing items have been duplicated (on how many mailboxes btw?)

    The only way I can see to sort it up right now is to start fresh with the migration making sure that mapfiles are created (the exported data is the same, should take less time than fixing things manually on 100+ mailboxes).

    Have a nice day,
    Cine
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  7. #7
    Active Member
    Join Date
    Aug 2012
    Posts
    5
    Quote Originally Posted by Cine View Post
    I think I miss the point (friday hits on both sides ), let me get this straight...

    - You exported your data from the source server
    - You imported the data in a brand new server, in which mapfiles have not been saved (as they are saved in the destination server)
    - Some items were missing, so you reimported the data in the destination server. Missing items were imported but existing items have been duplicated (on how many mailboxes btw?)

    The only way I can see to sort it up right now is to start fresh with the migration making sure that mapfiles are created (the exported data is the same, should take less time than fixing things manually on 100+ mailboxes).

    Have a nice day,
    Cine
    Sorry, i really need holidays! ( tonight).
    The problem is the new server is on production, now! it miss only one day of mail. If I start a fresh migration, i will lost all received mails on the new server ...

    Fortunately, we have tested the second import on only two mailboxes... So, there's 100+ mailboxes with only missing 1 day of mail.

    It was our first migration using Zextra... Now we know what we do (not) have to do

    Thanks again for your hep

  8. #8
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,342
    Quote Originally Posted by phig View Post
    Sorry, i really need holidays! ( tonight).
    The problem is the new server is on production, now! it miss only one day of mail. If I start a fresh migration, i will lost all received mails on the new server ...

    Fortunately, we have tested the second import on only two mailboxes... So, there's 100+ mailboxes with only missing 1 day of mail.

    It was our first migration using Zextra... Now we know what we do (not) have to do

    Thanks again for your hep
    Now I get it

    Your best option in this case is to create a script that exports all emails arrived/sent during the missing period through Zimbra's REST API and another one to import them back to the new production server...

    A sample to create the first script:

    Code:
    zmprov -l gaa | while read -r account; do echo -e "sm $account\ngetRestURL \"/?fmt=zip\&query=date:\\\"8/3/12\\\"\" > /tmpdir/$account.zip"; done > export.zmmailbox
    zmmailbox < export.zmmailbox
    This generates a file with a list of commands that is given as input to zmmailbox. The commands parse through each mailbox on the server and extract all .eml files matching the provided query to a zipfile (one zip per account: /tmpdir/account@domain.tld.zip).
    You just need to change the /tmpdir/ to a path the zimbra user can write in and the query to match the missing day - you can build the query in the webclient's Advanced Search using the "date" and "time" options to narrow down the search to your need to reduce duplicated items as much as possible.

    You can then move the files to the new production server and create a script that uses "postRestURL" to import the .zip files in the proper mailbox (unfortunately no sample here)...

    Have a nice weekend,
    Cine
    Last edited by Cine; 08-03-2012 at 05:05 PM.
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  9. #9
    Active Member
    Join Date
    Aug 2012
    Posts
    5
    Quote Originally Posted by Cine View Post
    Now I get it

    Your best option in this case is to create a script that exports all emails arrived/sent during the missing period through Zimbra's REST API and another one to import them back to the new production server...

    A sample to create the first script:

    Code:
    zmprov -l gaa | while read -r account; do echo -e "sm $account\ngetRestURL \"/?fmt=zip\&query=date:\\\"8/3/12\\\"\" > /tmpdir/$account.zip"; done > export.zmmailbox
    zmmailbox < export.zmmailbox
    This generates a file with a list of commands that is given as input to zmmailbox. The commands parse through each mailbox on the server and extract all .eml files matching the provided query to a zipfile (one zip per account: /tmpdir/account@domain.tld.zip).
    You just need to change the /tmpdir/ to a path the zimbra user can write in and the query to match the missing day - you can build the query in the webclient's Advanced Search using the "date" and "time" options to narrow down the search to your need to reduce duplicated items as much as possible.

    You can then move the files to the new production server and create a script that uses "postRestURL" to import the .zip files in the proper mailbox (unfortunately no sample here)...

    Have a nice weekend,
    Cine

    Perfect!
    we restored the missing mail in a few minuts with this method.
    I will post the script a soon as we standardize it ( the actual one is really trashy)

    many, many thanks for your help !

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
  •