Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-2011, 03:52 PM
Loyal Member
 
Posts: 84
Default Zimbra to Zimbra Migration Failure [SOLVED]

I've been tasked with updating an old, fairly small, Zimbra install ("Release 6.0.6_GA_2324.DEBIAN4.0 DEBIAN4.0 FOSS edition") to the latest release.

As the machine needs a full OS refresh (that Debian release is not supported any more, and Debian is dropping out of your supported OS list completely anyway) I thought that a completely fresh install (latest stable Zimbra (7.1.3) on Ubuntu 10.04) followed by a migration would be the path of least resistance, though that may have been a bad assumption.

Following the notes at » Zimbra :: Blog I have run
Code:
/opt/zimbra/bin/zmmailbox -z -m user@domain.net getRestURL "//?fmt=tgz" > user.tgz
for each account on the old server, transferred the files over, created the accounts, and then run
Code:
/opt/zimbra/bin/zmmailbox -z -m user@domain.net postRestURL "//?fmt=tgz\&resolve=reset" ./user.tgz
for each.

The tgz files seem to be of the sort of size I would be expecting, and no errors are reported (aside from first time around when I hit a "request too large" message fixed by increasing the maximum request size in the admin console), but nothing seems to import where the user can see it (no mail, no folders, no calendar information).

The command takes a while to think, and the account's used quota value goes up by a chunk, and the space used under /opt goes up, so something has happened. If I run the same import command again the user's quota goes up again, so it would seem that the data is being stored somewhere instead of being processed as an import?

Is there something obvious that I'm doing wrong?

I'm going to try rebuild the destination machine from scratch, if only to get rid of the space consumed in /opt (which doesn't seem to be released when the relevant account is deleted) then try again, but any pointers as to what logs are relevant for finding what happens (the command outputs nothing to stdout or stderr), or pointers to what I'm missing (if I'm doing something wrong) would be appreciated.

(plan B is to upgrade rather than reinstalling on the new architecture and migrating: 1. upgrade to latest 6.0.x, 2. migrate the whole lot from Debian/x86 to the new VM running Ubuntu/a64, 3. upgrade to 7.1.x - but that may take far longer if only as I'd probably backup the whole VM(s) at each step for paranoia's sake, and I'm told there are extra complications with a jump from x86->a64)

Last edited by dspillett; 10-17-2011 at 11:34 AM.. Reason: Marking as "solved"
Reply With Quote
  #2 (permalink)  
Old 10-16-2011, 07:47 PM
Advanced Member
 
Posts: 206
Default

Hi dspillet,

Quote:
Code:
/opt/zimbra/bin/zmmailbox -z -m user@domain.net postRestURL "//?fmt=tgz\&resolve=reset" ./user.tgz
Try without the backslash before the ampersand.

/opt/zimbra/bin/zmmailbox -z -m user@domain.net postRestURL "//?fmt=tgz&resolve=reset" ./user.tgz

Regards.
Reply With Quote
  #3 (permalink)  
Old 10-17-2011, 11:23 AM
Loyal Member
 
Posts: 84
Default

Thankyou. Such a simple mistake too - I'm not sure where the double escapement (quotes and slash) came from as it isn't there in the original reference pages I cribbed from. First quick test shows it certainly seems to work as expected with your correction.

I have located where the data went previously: Zimbra has accepted the files as if they were single mail messages and dropped them into the store, i.e.:
Code:
-rw-r----- 1 zimbra    zimbra    277M 2011-10-16 22:01 /opt/zimbra/store/0/10/msg/0/261-101.msg
As I can't find these objects anywhere in the web interface (admin or user), and the space they consumed didn't go when I deleted one of the affected accounts (so they may not be properly linked to the accounts in question at all), would it be safe to just remove them? Or is there anything else that needs to be done to update indexes, so they are no longer counted against the account's quota and to avoid the files being missing getting picked up as an artifact of corruption in the store further down the line?
Reply With Quote
  #4 (permalink)  
Old 10-17-2011, 11:33 AM
Loyal Member
 
Posts: 84
Default

Ah, found what seems to be the answer to my second question. I'll quote it here in case others have the same problem later:
  1. delete the extraneous blobs
  2. run zmblobchk --missing-blob-delete-item --no-export start to update elsewhere
Take a full backup first, of course, if this is not a test environment that you don't care about killing if something goes wrong.
Reply With Quote
  #5 (permalink)  
Old 10-17-2011, 01:27 PM
Advanced Member
 
Posts: 206
Default

Hi dspillet,

When you put the backslash apperars to generate an index problems, i mean, zmmailbox puts the message in the store but it's unaccesible. I think it's safe delete the account, create again and migrate.

Regards
Reply With Quote
  #6 (permalink)  
Old 10-18-2011, 01:50 AM
Loyal Member
 
Posts: 84
Default

Yeah, I think the backslashes were a subconscious keystroke to (unnecessarily) escape the ampersand on the command line. I did it multiple times too: I completely reinstalled the VM once and started again. Fool, eh?

Removing the errant blobs seems to have caused no ill. zmblobchk removed them from quota counts (and presumably other indexes) for the accounts I'd not removed first. They must have been in an odd state to be found by that (linked to existing accounts) but not be removed when the accounts were deleted, but all is well now.
Reply With Quote
  #7 (permalink)  
Old 10-18-2011, 09:20 AM
Advanced Member
 
Posts: 206
Default

Absolutely right!

Thanks.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.