Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34

Thread: Per User Backup for FOSS edition

  1. #31
    kminamoto's Avatar
    kminamoto is offline Intermediate Member
    Join Date
    Nov 2009
    Location
    Chile
    Posts
    17
    Rep Power
    5

    Cool Didn't work for me, sorry.

    Hi everyone!
    I hate having bad news, but it didn't work for me.
    I upgraded recently to ZCS 7 FOSS over RHEL 5.4 and tried the backup script, but all I get is this:

    Code:
    [root@mail ~]# ./zimbra_backup_all_users.sh 
    Fri Mar 18 10:20:55 CLT 2011 : ./zimbra_backup_all_users.sh Started
    Fri Mar 18 10:20:55 CLT 2011 : Dumping zimbra --single-transaction > /backup/zimbra_backup/zimbra.sql
    Fri Mar 18 10:20:56 CLT 2011 : Dumping LDAP
    Fri Mar 18 10:20:58 CLT 2011 : Getting accounts
    ERROR: service.INVALID_REQUEST (invalid request: can only be used with  "zmprov -l/--ldap")
    Fri Mar 18 10:21:02 CLT 2011 : ./zimbra_backup_all_users.sh Finished
    I'm quite new to Zimbra, and I'd really appreciate your help.
    PS.: If this message is related to another already posted, I'm very sorry

    (UPDATE)
    It works great now!
    Just replaced the zmprov section with zmprov -l and all went smooth and running. Also managed to rsync everything to a remote server within my LAN.

    So thank you very much. Great work!

    Thanks in advance.
    KMinamoto
    Last edited by kminamoto; 07-05-2011 at 01:50 PM. Reason: Now it works

  2. #32
    bhangki is offline Active Member
    Join Date
    Mar 2011
    Location
    Philippines
    Posts
    39
    Rep Power
    4

    Unhappy

    hi to all,

    any update to this thread?
    i encountered error running the restore.sh scripts.

    [root@mail opt]# ./restore.sh student@domain /opt/zimbra_backup/student\@domain/2011-04-08-0947/
    Fri Apr 8 10:31:59 PHT 2011 : Processing student@domain
    Fri Apr 8 10:32:25 PHT 2011 : Getting group_id and index_volume_id
    Fri Apr 8 10:32:25 PHT 2011 : zimbraId : 1dff4883-de5d-47d5-8194-0a7c1c81b399
    Fri Apr 8 10:32:25 PHT 2011 : Id : 4
    Fri Apr 8 10:32:25 PHT 2011 : Group : 4
    Fri Apr 8 10:32:25 PHT 2011 : Mailbox : mboxgroup4
    Fri Apr 8 10:32:25 PHT 2011 : Quota Used : 17129
    Fri Apr 8 10:32:25 PHT 2011 : Getting message_volume_id and index_volume_id
    Fri Apr 8 10:32:25 PHT 2011 : Getting index volume path
    Fri Apr 8 10:32:25 PHT 2011 : Getting message volume path
    Fri Apr 8 10:32:25 PHT 2011 : index1 path : /opt/zimbra/index
    Fri Apr 8 10:32:25 PHT 2011 : message1 path : /opt/zimbra/store
    Fri Apr 8 10:32:38 PHT 2011 : student@domain is now in maintenance mode.
    Fri Apr 8 10:32:38 PHT 2011 : Restoring index_n_store tarball to /opt/zimbra_cache/student@domain
    ls: /opt/zimbra_cache/student@domain/opt/zimbra/index: No such file or directory
    ls: /opt/zimbra_cache/student@domain/opt/zimbra/store: No such file or directory

    Fri Apr 8 10:32:38 PHT 2011 : Restoring mboxgroup4 < /opt/zimbra_backup/student@domain/2011-04-08-0947//mboxgroup4.sql
    Fri Apr 8 10:32:41 PHT 2011 : Restoring zimbra < /opt/zimbra_backup/student@domain/2011-04-08-0947//mailbox.sql
    ERROR 1062 (23000) at line 25: Duplicate entry '4' for key 'PRIMARY'
    Fri Apr 8 10:32:41 PHT 2011 : Restoring zimbra < /opt/zimbra_backup/student@domain/2011-04-08-0947//mailbox_metadata.sql
    ERROR 1062 (23000) at line 25: Duplicate entry '4-CONTACT_RANKINGS' for key 'PRIMARY'
    Fri Apr 8 10:32:41 PHT 2011 : Restoring zimbra < /opt/zimbra_backup/student@domain/2011-04-08-0947//out_of_office.sql
    Fri Apr 8 10:32:41 PHT 2011 : Restoring zimbra < /opt/zimbra_backup/student@domain/2011-04-08-0947//scheduled_task.sql
    Fri Apr 8 10:32:41 PHT 2011 : Restoring zimbra < /opt/zimbra_backup/student@domain/2011-04-08-0947//table_maintenance.sql
    Fri Apr 8 10:32:54 PHT 2011 : student@domain is now in active mode.

    btw i used the restore.sh scripts that was posted before.

    any help and suggestions is much appreciated.

    thanks
    Last edited by bhangki; 04-07-2011 at 11:07 PM.

  3. #33
    kminamoto's Avatar
    kminamoto is offline Intermediate Member
    Join Date
    Nov 2009
    Location
    Chile
    Posts
    17
    Rep Power
    5

    Default

    After a couple of years working 24/7/365, I recently had a very bad disk crash on my Zimbra server. Unfortunately, none of the recovery methods in the forum worked for me, so I had to start a new server from scratch.
    Now I'm recovering my old server's messages to the new server via the "addMessage way", and the per user Backup posted in this thread has proved to be very useful, because I only had to read the mailbox.sql file in each mailbox backup to know what was the old server's user ID N°, hence making my job a lot easier.
    Thank you very much for your good disposition on mantaining the forum and threads.
    Kindest regards,

    KM.
    Last edited by kminamoto; 10-18-2012 at 11:41 AM.

  4. #34
    vitich is offline Intermediate Member
    Join Date
    Nov 2010
    Posts
    17
    Rep Power
    4

    Default

    zimbra_restore_user.sh does not work (NO_SUCH_BLOB errors)

    Anyway, it's much easier than you expect

    Export to archive:
    zmmailbox -z -m user@domain getRestURL "//?fmt=tgz" > /backup/mailboxes/user@domain.tgz

    Import from archive:
    zmmailbox -z -m user@domain postRestURL "//?fmt=tgz&resolve=reset" /backup/mailboxes/user@domain.tgz

    If you need bulk mail export/import you should do something like that:
    #!/bin/sh
    folders=`zmprov -l sa zimbraAccountStatus=active | grep '@' | awk '{print $1}' | grep "my.mail.domain" | sort -n`
    for i in $folders;
    do
    zmmailbox -z -m $i getRestURL "//?fmt=tgz" > /backup/mailboxes/$i.tgz
    done

    Zimbra accounts are stored in LDAP - so if you want export|import|migrate IMHO you should operate with LDAP

    Source1 and Source2

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 AM
  3. Services stopped working
    By lilwong in forum Administrators
    Replies: 4
    Last Post: 08-15-2006, 09:19 AM
  4. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM
  5. Network edition - strange behavior
    By goetzi in forum Installation
    Replies: 6
    Last Post: 11-16-2005, 03:08 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
  •