Results 1 to 2 of 2

Thread: Backup and restore mail filters on a new ZCS

  1. #1
    desport is offline Member
    Join Date
    Nov 2009
    Posts
    13
    Rep Power
    5

    Default Backup and restore mail filters on a new ZCS

    Hello,

    I noticed that the REST method doesn't save the filters rules :
    zmmailbox -z -m aide@mydomain.com getRestURL //?fmt=tgz > /mail/export/backup/accounts/aide.tgz

    So I tried these commands :
    - backup

    zmmailbox -z -m aide@mydomain.com >> filters

    - restore script on the new zcs

    exec < filters
    while read line
    do
    zmmailbox -z -m aide@mydomain.com addFilterRule $line
    done

    Restore fails because of spaces in rules name, folders...

    ERROR: zclient.CLIENT_ERROR (unknown keyword: commun/sacoche")
    ERROR: zclient.CLIENT_ERROR (unknown keyword: logiciels)
    ...

  2. #2
    hugolf is offline New Member
    Join Date
    Mar 2013
    Posts
    3
    Rep Power
    2

    Default

    Quote Originally Posted by desport View Post
    Hello,

    I noticed that the REST method doesn't save the filters rules :
    zmmailbox -z -m aide@mydomain.com getRestURL //?fmt=tgz > /mail/export/backup/accounts/aide.tgz

    So I tried these commands :
    - backup

    zmmailbox -z -m aide@mydomain.com >> filters

    - restore script on the new zcs

    exec < filters
    while read line
    do
    zmmailbox -z -m aide@mydomain.com addFilterRule $line
    done

    Restore fails because of spaces in rules name, folders...

    ERROR: zclient.CLIENT_ERROR (unknown keyword: commun/sacoche")
    ERROR: zclient.CLIENT_ERROR (unknown keyword: logiciels)
    ...
    I had the same need and managed to solve as follows:

    # Backup filters
    /opt/zimbra/bin/zmmailbox -z -m mail@domain.com gfrl > /opt/backup/mail.filters

    # Restoring filters on the new server
    /opt/zimbra/bin/zmmailbox -z -m mail@domain.com <<END
    $(cat /opt/backup/mail.filters | sed -e 's|^|afrl |g')
    END

    I know I've decided otherwise, however I am leaving the solution for future research.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. restore an user's mail filters
    By abc789 in forum Administrators
    Replies: 2
    Last Post: 01-15-2011, 08:54 PM
  2. ZCS NE Backup - Archiving To Tape Is To Slow
    By Chewie71 in forum Administrators
    Replies: 10
    Last Post: 09-19-2008, 04:59 PM
  3. Replies: 6
    Last Post: 03-28-2008, 11:51 AM
  4. Backup and Restore of 4.5.7 CE
    By bjquinn in forum Administrators
    Replies: 5
    Last Post: 10-30-2007, 03:44 PM
  5. Restore single account failed from full backup
    By fmodola in forum Administrators
    Replies: 4
    Last Post: 06-20-2007, 05:27 AM

Posting Permissions

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