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

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
  #21 (permalink)  
Old 10-22-2009, 05:25 AM
Starter Member
 
Posts: 1
Default

I would like to take some questions with you. I'm using version 6.0.1_GA_1816.DEBIAN5 DEBIAN5 FOSS edition. Run scripts zimbra_backup_full.sh, zimbra_backup_all_users.sh, zimbra_backup_user.sh, zimbra_functions.sh e zimbra_restore_user.sh. The backup is successful. Let's assume that my disk where you installed Zimbra der problem. I need to reinstall zimbra, how can I restore all e-mail accounts and personal information (messages, contacts, calendar). If I go back to zimbra entire folder and run the installation know that everything will go back as it was before, but if I want to do a fresh install and recover only some accounts, is it possible?

Thanks
Reply With Quote
  #22 (permalink)  
Old 10-22-2009, 11:12 AM
New Member
 
Posts: 3
Default

That is what the full system backup would be for. These backup scripts are useful for individual mailbox backups which allow you to restore an individual mailbox in the event that a user decides to delete all of his/her email and then clear the trash or some other equally intelligent "stupid user trick".

As I stated in my posts above the restore using these backup scripts is serviceable, but not perfect. I have not yet been able to get the calendar to restore properly, but all other data can be restored properly if you follow the proper procedure which is not documented with the scripts.

Keep in mind that these backup are tied to the user ID or whatever its called by zimbra which means if the user account/mailbox is removed then the backup is useless.

A full system backup will allow you to fully restore the server in the event that your machine takes a dump one afternoon, but it is not a great solution if you need to restore one users mailbox from three days ago.

Hope this helps
Ono-sendai
Reply With Quote
  #23 (permalink)  
Old 12-21-2009, 07:47 AM
Starter Member
 
Posts: 2
Default Restore Script?

Congratulations.

Your backup script works fine... but, when the restore script will be avaiable?
Reply With Quote
  #24 (permalink)  
Old 02-01-2010, 04:13 AM
Special Member
 
Posts: 119
Default

how to restore the user mailbox ?
Reply With Quote
  #25 (permalink)  
Old 02-09-2010, 08:29 AM
Loyal Member
 
Posts: 87
Default restore !!!

how to restore ? nobody give a response ?
__________________
Ask Forever...
Reply With Quote
  #26 (permalink)  
Old 02-09-2010, 09:27 AM
Zimbra Consultant & Moderator
 
Posts: 19,637
Default

Quote:
Originally Posted by marisu View Post
how to restore ? nobody give a response ?
When I last posted in this thread May last year there was no restore feature, a user has added a restore (check post #18) feature - use that and test it. You should be aware that you use it at your own risk, I'd suggest you try it on a test server.
__________________
Regards


Bill
Reply With Quote
  #27 (permalink)  
Old 03-07-2010, 08:25 AM
Loyal Member
 
Posts: 87
Default Thanks

Thanks a lot ! I will have a try.
__________________
Ask Forever...
Reply With Quote
  #28 (permalink)  
Old 03-24-2010, 03:56 AM
Junior Member
 
Posts: 9
Default

Thanks for the script. However, I do detect some sort of problem. When restoring the mailbox, you'll get the storage, which is a flat directory, with no folder structure at all and the MySQL datastore (See: Zimbra Server - Zimbra :: Wiki).

Now when restoring the mailbox, restoring the storage is no problem. But when restoring the folder structure, using the MySQL datastore. You should only restore the items with the correct mailbox_id. This script however dumps the complete mboxgroup database. Which is, in my opinion a bit to much of a hassle. And will restore other accounts as well, which will leave them with indexes to deleted files as well.

I prefer to add the following lines to zimbra_backup_user.sh

line 105
Code:
zimbra_dump_sql "${mailbox} mail_item --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/mail_item.sql"
zimbra_dump_sql "${mailbox} appointment --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/appointment.sql"
zimbra_dump_sql "${mailbox} data_source_item --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/data_source_item.sql"
zimbra_dump_sql "${mailbox} imap_folder --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/imap_folder.sql"
zimbra_dump_sql "${mailbox} imap_message --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/imap_message.sql"
zimbra_dump_sql "${mailbox} open_conversation --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/open_conversation.sql"
zimbra_dump_sql "${mailbox} pop3_message --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/pop3_message.sql"
zimbra_dump_sql "${mailbox} revision --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/revision.sql"
zimbra_dump_sql "${mailbox} tombstone --no-create-info --where \"mailbox_id='${mailbox_id}'\" > ${current_backup}/tombstone.sql"
This will enable you to restore the datastore per user, instead of per mailbox group.

Thanks for the script though, which is a great help.
Reply With Quote
  #29 (permalink)  
Old 05-24-2010, 08:57 AM
New Member
 
Posts: 3
Default

Thanks for the effort in scripts. I have tested 'zimbra_backup_user.sh' and it appears to work fine. Then i ran 'zimbra_restore_user.sh' (adding the lines that ict4schools posted above). Everything seems to be restored fine. But in the process of restoration, i recieve this twoo errors:

Mon May 24 08:31:44 CST 2010 : Processing manu@testmail.usac.edu.gt
Mon May 24 08:31:57 CST 2010 : Getting group_id and index_volume_id
Mon May 24 08:31:57 CST 2010 : zimbraId : 1073a1b5-390f-43b3-9cbd-ec49cd441e02
Mon May 24 08:31:57 CST 2010 : Id : 11
Mon May 24 08:31:57 CST 2010 : Group : 11
Mon May 24 08:31:57 CST 2010 : Mailbox : mboxgroup11
Mon May 24 08:31:57 CST 2010 : Quota Used : 3500
Mon May 24 08:31:57 CST 2010 : Getting message_volume_id and index_volume_id
Mon May 24 08:31:58 CST 2010 : Getting index volume path
Mon May 24 08:31:58 CST 2010 : Getting message volume path
Mon May 24 08:31:58 CST 2010 : index1 path : /opt/zimbra/index
Mon May 24 08:31:58 CST 2010 : message1 path : /opt/zimbra/store
Mon May 24 08:32:07 CST 2010 : manu@testmail.usac.edu.gt is now in maintenance mode.
Mon May 24 08:32:07 CST 2010 : Restoring index_n_store tarball to /opt/zimbra_cache/manu@testmail.usac.edu.gt
ls: cannot access /opt/zimbra_cache/manu@testmail.usac.edu.gt/opt/zimbra/index: No such file or directory
ls: cannot access /opt/zimbra_cache/manu@testmail.usac.edu.gt/opt/zimbra/store: No such file or directory
Mon May 24 08:32:07 CST 2010 : Restoring mboxgroup11 < /opt/zimbra_backup/manu@testmail.usac.edu.gt/2010-05-24-0827//mboxgroup11.sql
Mon May 24 08:32:09 CST 2010 : Restoring zimbra < /opt/zimbra_backup/manu@testmail.usac.edu.gt/2010-05-24-0827//mailbox.sql
ERROR 1062 (23000) at line 25: Duplicate entry '11' for key 1
Mon May 24 08:32:09 CST 2010 : Restoring zimbra < /opt/zimbra_backup/manu@testmail.usac.edu.gt/2010-05-24-0827//mailbox_metadata.sql
ERROR 1062 (23000) at line 25: Duplicate entry '11-CONTACT_RANKINGS' for key 1
Mon May 24 08:32:09 CST 2010 : Restoring zimbra < /opt/zimbra_backup/manu@testmail.usac.edu.gt/2010-05-24-0827//out_of_office.sql
Mon May 24 08:32:09 CST 2010 : Restoring zimbra < /opt/zimbra_backup/manu@testmail.usac.edu.gt/2010-05-24-0827//scheduled_task.sql
Mon May 24 08:32:09 CST 2010 : Restoring zimbra < /opt/zimbra_backup/manu@testmail.usac.edu.gt/2010-05-24-0827//table_maintenance.sql
Mon May 24 08:32:19 CST 2010 : manu@testmail.usac.edu.gt is now in active mode.

can comebody tell me what i'm doing wrong?

Thanks.
Reply With Quote
  #30 (permalink)  
Old 09-30-2010, 04:04 AM
Member
 
Posts: 13
Default

I have try to backup user files with the zimbra_backup_user.sh and when i restore with the script zimbra_restore_user.sh i have this error:

[root@zimbra zimbra_backup]# ./zimbra_restore_user.sh user@domain.it /opt/zimbra_cache/user\@domain.it/
Thu Sep 30 11:54:07 CEST 2010 : Processing user\@domain.it
grep: /opt/zimbra_cache/user\@domain.it//ga.txt: No such file or directory
************************************************** *************
* There seems to be a problem with account user\@domain.it *
* Either the account doesn't exist or the backup and *
* current zimbraIds don't match *
* *
* Restore operation cancelled. *
************************************************** *************

Don't find the ga.txt file....backup script don't create ga.txt file....any idea?
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.