Results 1 to 7 of 7

Thread: Addressbook(s) backup

  1. #1
    anandi is offline Member
    Join Date
    May 2009
    Posts
    12
    Rep Power
    6

    Default Addressbook(s) backup

    Hi,

    I am currently working on a script for my client for backing up all their addressbooks for each of their respective users, where i have hit a wall.

    This is what i am using to backup the contacts:

    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:Contacts'
    This is what i am using to backup the emailed contacts:

    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:Emailed Contacts'
    Now the contacts command is giving me the csv, but the emailed contacts one is NOT. It just gives me the below error

    Code:
    ERROR: service.FAILURE (system failure: GET from https://mail.domain.com:443/home/user@domain.com/?fmt=csv&query=under:Emailed%20Contacts failed, status=404.  no such item)
    Whereas when i go to the web interface, i see contacts under "Emailed Contacts".

    Any ideas on where i am going wrong ?

    Also i need a way to be able to get a list of all addressbooks users have. Example: A user created "Internal Users Addressbook", "Client X List". Now i want my script to be able to backup all of them, but unless i know their names, its difficult to do so.

    The command i pointed above doesn't work for anything but the contacts folder. There has to be a way to get a list and then back them up. Or back them up all together.

    Any help would be appreciated.

    Thanks

  2. #2
    anandi is offline Member
    Join Date
    May 2009
    Posts
    12
    Rep Power
    6

    Default

    To add, i tried another approach,

    Code:
    zmmailbox -z -m user gact
    Even the above doesn't show / list contacts from all the addressbooks, but only shows "Contacts" and "Emailed Contacts". On top, i would prefer to get a csv version

  3. #3
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    472
    Rep Power
    4

    Default

    Quote Originally Posted by anandi View Post
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:Emailed Contacts' above doesn't show / list contacts from all the addressbooks, but only shows "Contacts" and "Emailed Contacts". On top, i would prefer to get a csv version
    Hi, anandi,

    Just change:

    Code:
    
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:Emailed Contacts'
    by
    Code:
    
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:"Emailed Contacts"'

    ccelis

  4. #4
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    472
    Rep Power
    4

    Default

    Hi again anandi,

    You could use
    Code:
    zmmailbox -z -m user gaf
    And play with folder type, which is in this case "cont" and then extract what you need.

    ccelis

  5. #5
    anandi is offline Member
    Join Date
    May 2009
    Posts
    12
    Rep Power
    6

    Default

    Quote Originally Posted by ccelis5215 View Post
    Hi, anandi,

    Just change:

    Code:
    
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:Emailed Contacts'
    by
    Code:
    
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:"Emailed Contacts"'

    ccelis
    Worked like a charm. Thanks ccelis. Appreciate the help

  6. #6
    anandi is offline Member
    Join Date
    May 2009
    Posts
    12
    Rep Power
    6

    Default

    Quote Originally Posted by ccelis5215 View Post
    Hi again anandi,

    You could use
    Code:
    zmmailbox -z -m user gaf
    And play with folder type, which is in this case "cont" and then extract what you need.

    ccelis
    Got it. Thanks

  7. #7
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    472
    Rep Power
    4

    Default

    Quote Originally Posted by anandi View Post
    Got it. Thanks
    You're welcome.

    ccelis

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AddressBook
    By dserkez in forum General Questions
    Replies: 0
    Last Post: 08-30-2010, 09:48 AM
  2. addressbook bug?
    By bouter in forum Administrators
    Replies: 1
    Last Post: 07-07-2010, 12:30 AM
  3. addressbook
    By Matrox in forum Users
    Replies: 0
    Last Post: 02-08-2010, 09:55 AM
  4. addressbook
    By Matrox in forum Installation
    Replies: 0
    Last Post: 02-08-2010, 09:55 AM
  5. add new addressbook
    By jsturtevant in forum Administrators
    Replies: 1
    Last Post: 12-11-2006, 10:26 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
  •