Results 1 to 10 of 10

Thread: Store restore

  1. #1
    nanosani is offline Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    8

    Default Store restore

    I have got the store folder as a backup from a previous zimbra mail server (It was on Ubuntu). Now I have a new Zimbra server on FC5. I've made the same users that were on the previous server on the new server too. Now my question is that how do I restore the messages in store folder to appropriate users ?

  2. #2
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default Limited restore via zmmailbox

    If all you have is the store folder, you're going to lose your tags, folders, read status, contacts, etc. But, as you've surmised, you can get the mail back.

    The store folder has a subfolder called incoming (ignore it) and at least one numbered folder starting with 0. Look at the subfolders of these numbered folders, which are also numbered. In other words, store/0/1, store/0/2, etc. Each of these sub-subfolders of store contains all the mail for a single user. With only the store folder available, you have to figure out whose folder is whose by brainpower and observation.

    When you've figured out who a given folder (say, store/0/2) belongs to, you'll add the messages in the leaf folders in that directory to the appropriate account on your new mailbox server. (These leaf directories will be named something like store/0/2/msg/0.) Attach to the new server via the zmmailbox tool and use zmmailbox addMessage INBOX store/0/2/msg/0 (or whatever the path to the leaf folder is) -- all the mail in the subfolder will be added. Repeat for the remainder of the leaf folders in that mailbox's store folder.

    Do this for every subsubfolder of store and you'll be good!
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    nanosani is offline Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    8

    Default

    When I executed this as zimbra user:
    zmmailbox addMessage INBOX store/0/3/msg/0

    I got this error:
    ERROR: zclient.CLIENT_ERROR (no mailbox selected. select one with authenticate/adminAuthenticate/selectMailbox)

    And then I executed:

    #zmmailbox
    >authenticate user@domain.com password
    >addMessage INBOX store/0/3/msg/0

    I get this error:

    Exception in thread "main" java.io.FileNotFoundException: store/0/3/msg/0 (Permission denied)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.jav a:106)
    at com.zimbra.common.util.ByteUtil.getContent(ByteUti l.java:86)
    at com.zimbra.cs.zclient.ZMailboxUtil.addMessage(ZMai lboxUtil.java:1095)
    at com.zimbra.cs.zclient.ZMailboxUtil.doAddMessage(ZM ailboxUtil.java:1113)
    at com.zimbra.cs.zclient.ZMailboxUtil.execute(ZMailbo xUtil.java:741)
    at com.zimbra.cs.zclient.ZMailboxUtil.interactive(ZMa ilboxUtil.java:1749)
    at com.zimbra.cs.zclient.ZMailboxUtil.main(ZMailboxUt il.java:1823)

  4. #4
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default Permissions issue.

    Run as the zimbra user. If those files are owned by someone else, chown them to zimbra:zimbra or else just run as that user.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    nanosani is offline Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    8

    Default

    I'm running all this as zimbra user .. any other options ??

  6. #6
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default

    If those files are owned by someone else, chown them to zimbra:zimbra or else just run as that user.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  7. #7
    nanosani is offline Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    8

    Default

    Thank you so much dkarp. I was able to successfully retrieve my mails in appropriate mail boxes. Thanks for your help.

  8. #8
    nanosani is offline Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    8

    Default

    Now the problem with my mailbox is that I have all the mails restored to the date of today .. when I open the mailbox in mozilla thirderbird, it shows the correct dates .. but when I open in a web browser, it shows the modified date of the file rather than created date. Any ideas ?

  9. #9
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    11

    Default X-Zimbra-Received

    Quote Originally Posted by nanosani View Post
    Now the problem with my mailbox is that I have all the mails restored to the date of today .. when I open the mailbox in mozilla thirderbird, it shows the correct dates .. but when I open in a web browser, it shows the modified date of the file rather than created date. Any ideas ?
    If you run a script to copy the "Date" header into a new "X-Zimbra-Received" header before you do the import, the messages will be imported as if they'd been received when the message was sent rather than when they were imported.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  10. #10
    nanosani is offline Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    8

    Default

    sorry but I've never been to scripting .. can your explain more about it so that I may be able to do it successfully?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Disaster Recovery Restore of Zimbra on Apple OS X
    By k.beeby@albion.co.uk in forum Administrators
    Replies: 2
    Last Post: 03-11-2008, 08:40 AM
  2. copying only last full backup to store offsite
    By riccadus in forum Administrators
    Replies: 0
    Last Post: 01-11-2007, 01:29 AM
  3. Network Edition restore problems??
    By jdell in forum Administrators
    Replies: 0
    Last Post: 10-25-2006, 05:00 PM
  4. restore account to a point in time in the past
    By shanson in forum Administrators
    Replies: 1
    Last Post: 07-24-2006, 05:50 PM
  5. Restore options for OSS version
    By iain in forum Administrators
    Replies: 2
    Last Post: 03-22-2006, 08:38 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
  •