Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Restoring a single mailbox

  1. #1
    Join Date
    Dec 2009
    Location
    Netherlands
    Posts
    47
    Rep Power
    5

    Default Restoring a single mailbox

    Hi,

    Just hypothetically (nothing happened), can I (somewhat) safely restore only one mailbox from a backup of my Zimbra FOSS edition? I backup using rdiff-backup to an external partition (no LVM snapshots), and I make separate mysqldumps and ldap dumps.

    I have to questions. the first is:

    My mysqldumps and /opt/zimbra backups aren't of the same time. If I restore the mailbox's store in /opt/zimbra/store/3 (mailbox id 3 in this example) and then restore the mysql DB mboxgroup3 from the dump, the store can have information in it that is not present in the MysqlDB.

    This page explains what the mysql datastore stores, but it is not clear to me what would happen if there are messages in the store that aren't in mysql. My best guess would be that it's not visible, because the mysql DB is the list of messages and the store is only used to look the message up, not to see what is actually there. Is that right?

    Would a good restore method be to simply restore /opt/zimbra/store/3 and /opt/zimbra/db/data/mboxgroup3?

    My second question is: what if someone deleted half their mailbox?



    Zimbra: Release 7.1.4_GA_2555.UBUNTU10_64 UBUNTU10_64 FOSS edition, Patch 7.1.4_P1.

  2. #2
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by halfgaar View Post
    Hi,
    This page explains what the mysql datastore stores, but it is not clear to me what would happen if there are messages in the store that aren't in mysql. My best guess would be that it's not visible, because the mysql DB is the list of messages and the store is only used to look the message up, not to see what is actually there. Is that right?
    Sort of. The DB is used to look messages up, the file in the store is the message. No DB entry, no display of the message, though the message may still exist in the store.
    Would a good restore method be to simply restore /opt/zimbra/store/3 and /opt/zimbra/db/data/mboxgroup3?
    Sort of. If you have at most 100 users, the store folder number will match the mboxgroup number. But, there are 100 DBs max, so user 103, 203, etc. also use mboxgroup3. And, you do not show the actual user store. The store is under the volume folder, e.g. /opt/zimbra/store/0/3. There may also be /opt/zimbra/store/1/3, /opt/zimbra/store/2/3, etc. Volume folders have maximum user folder limits, user folders have maximum message limits. So, for larger servers, you may have to restore the user store folder in multiple volume folders. Also, there's a good chance the DB and store will not be in sync, unless you backup both cold, i.e. with Zimbra not running.
    Here is a post on user restore:
    http://www.zimbra.com/forums/adminis...tml#post186403

    My second question is: what if someone deleted half their mailbox?
    Then you'd have a decision to make: restore their full mailbox from the last backup. Or, restore the deleted folders...probably one by one.
    Here is a post on folder restore:
    http://www.zimbra.com/forums/adminis...tml#post179918
    Last edited by LaFong; 03-04-2012 at 10:09 PM.

  3. #3
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    ...and be sure to enable the Zimbra Dumpster feature, which will handle most accidental deletions.

  4. #4
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Here's a very nice page on database and filesystem structure:
    Account mailbox database structure - Zimbra :: Wiki

  5. #5
    Join Date
    Dec 2009
    Location
    Netherlands
    Posts
    47
    Rep Power
    5

    Default

    Thanks; that's some interesting info. I requires some digesting. I also didn't know about the dumpster feature. And it wasn't readily apparent to me I could right-click my trash to recover stuff. Too bad it doesn't remember to which folder to recover to, though.

    For me, this question arose because at work (Exchange server) an important mailbox was just completely empty at some point, without a known reason. The backup was restored and all was fine.

    I manage several Courier-IMAP servers, where I also had to restore backups of everything because stuff disappeared for reasons like people that share accounts and one of them configured POP3 which removed everything. But because that's merely a file-based store, it's easy to restore.

    I was just wondering what I needed to do with Zimbra in cases of entire mailboxes being empty all of a sudden. Luckily, the POP thing can't happen on my server, because I closed the POP ports (POP is evil), but as of yet, there is no easy solution.

  6. #6
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by halfgaar View Post
    I manage several Courier-IMAP servers, where I also had to restore backups of everything because stuff disappeared for reasons like people that share accounts and one of them configured POP3 which removed everything. But because that's merely a file-based store, it's easy to restore.
    Yes, Maildir-based servers are nice that way. Just restore the message files, done.
    I was just wondering what I needed to do with Zimbra in cases of entire mailboxes being empty all of a sudden. Luckily, the POP thing can't happen on my server, because I closed the POP ports (POP is evil),
    You're right about that. I have been tempted to disable POP. But lots of mail clients default to it, and some people are used to its offline usage, though IMAP can be set to do the same thing.
    but as of yet, there is no easy solution.
    Well, the easy solution is to pay for the NE version. The methods I referenced are definitely not easy, but not all that difficult either. I didn't want to automate them too much, in case a problem came up with any individual step.

  7. #7
    Join Date
    Dec 2009
    Location
    Netherlands
    Posts
    47
    Rep Power
    5

    Default

    Well, the easy solution is to pay for the NE version.
    This Zimbra machine is a private server for me and a friend. Paying for the NE would be kind of 0verk1ll But I have plans to deploy it at work too.

    The methods I referenced are definitely not easy, but not all that difficult either. I didn't want to automate them too much, in case a problem came up with any individual step.
    I'll look into it. I've written a whole bunch of backup scripts and methods, so I think I'll be fine. First, I have to learn Zimbra's infrastructure a bit more.

  8. #8
    Join Date
    Jul 2006
    Location
    Verona, Italy
    Posts
    153
    Rep Power
    9

    Default

    Have you tried other backup solution like ZeXtras?

    My 2 cents.


    Sent from my iPhone using Tapatalk
    Federico Bertola
    CTO @ StudioStorti

  9. #9
    Join Date
    Nov 2008
    Location
    Denver, CO
    Posts
    221
    Rep Power
    7

    Default

    Quote Originally Posted by federico.bertola View Post
    Have you tried other backup solution like ZeXtras?

    My 2 cents.
    Looks very interesting. I had never heard of it. I saw a wiki post about using the redolog like this backup tool does. I'm a little cautious about the mobile module...ActiveSync can be tricky. The price is very right.

  10. #10
    Join Date
    May 2010
    Posts
    272
    Rep Power
    5

    Default

    OH PLEASE GUYS

    why you guys thinking so overcomplicated

    You want an easy solution - here it is
    make an virtual host - best is a clone of the server but i testet it with a regular ubuntu workstion it works there too

    get zimbra running on the clone

    so keep that vhost image in case you want to restore a single box - now

    in case oyu have to - easy - restore all datafolders to the clone - start it and export the mailbox on the commandline

    reimport on the production server


    - best way todo - if you can clone the server on the same host as zimbra runs - just change networkinterfaces to something noone can reach ever

    this you can use to restore in furture - just keep upgrading exactly same as you do with the real zimbra and youre fine

    of course you can shutown it when youre not need it

Similar Threads

  1. Zimbra Backup/Restore- Single Mailbox
    By nmsalert10 in forum Administrators
    Replies: 1
    Last Post: 12-21-2011, 01:04 AM
  2. Restoring mailbox using zmmailbox PostResURL
    By sevilla in forum Administrators
    Replies: 8
    Last Post: 10-24-2011, 09:49 AM
  3. restoring single user from backup
    By cangeceiro in forum Administrators
    Replies: 6
    Last Post: 03-06-2008, 12:43 PM
  4. can't you help me
    By iwan siahaan in forum Administrators
    Replies: 6
    Last Post: 12-17-2007, 06:53 PM
  5. Restoring one mailbox
    By kibo in forum Administrators
    Replies: 9
    Last Post: 02-28-2007, 10:31 AM

Tags for this Thread

Posting Permissions

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