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 03-06-2008, 08:16 AM
Intermediate Member
 
Posts: 20
Default restoring single user from backup

Is it possible to restore a single users mailbox from a backup? im backing up nightly by copying the /opt/zimbra directory to a backup folder. I had a user account deleted and i just want to restore that users mailbox to the current running system from these backups. I have found the mailbox in the store directory, but how would i retrieve the necessary mysql information and get it injected into the current system?
Reply With Quote
  #2 (permalink)  
Old 03-06-2008, 10:14 AM
Special Member
 
Posts: 122
Default

I can never remember how to do this off the top of my head, but its in the forum somewhere.

Found it...

How to restore a single email with the OSS version
__________________
Because we all can't be geniuses, I'll go first.
Reply With Quote
  #3 (permalink)  
Old 03-06-2008, 10:21 AM
Intermediate Member
 
Posts: 20
Default

this is only for a single email, i need to restore an entire users mailbox
Reply With Quote
  #4 (permalink)  
Old 03-06-2008, 10:40 AM
Special Member
 
Posts: 122
Default

The second example in that link will work for all the emails in the backup directory. You can't however restore the Calendar this way, you need the NE addition for that, or the backups you have been doing used a script that also copied the calendar info out of the database.
__________________
Because we all can't be geniuses, I'll go first.
Reply With Quote
  #5 (permalink)  
Old 03-06-2008, 10:42 AM
Intermediate Member
 
Posts: 20
Default

does this method retain folder structure and timestamps?
Reply With Quote
  #6 (permalink)  
Old 03-06-2008, 11:12 AM
Special Member
 
Posts: 122
Default

I don't believe folder structure can be restored with the OSS version, at least not easily or without a script.

Here's another link for using 'zmmailbox addMessage'

[SOLVED] zmlmptinject challange
__________________
Because we all can't be geniuses, I'll go first.
Reply With Quote
  #7 (permalink)  
Old 03-06-2008, 11:43 AM
Intermediate Member
 
Posts: 20
Default

hmm, Well i think i may have got this with out the need for the command line tools.

I fired up a spare mysql server with the data, dumped this into a text file via mysql dump. Opened the sql files in a text editor and replaced the mailbox_id with the users new id and removed the CREATE and DROP statements.

im holding off till the end of the day to try and restore these into the server, but would i be safe to assume that re-inserting this data and copying the file stores into the new user stores will get me going?

one thing i could not come across any information for though was how zimbra stores folder information. is this in mysql? i couldnt find a table that seemed relevant. I did notice the field "name" in the table "mail_item" that coincided with imap folders for the account.
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.