Addressbook(s) backup
Results 1 to 4 of 4

Thread: Addressbook(s) backup

  1. #1
    Member ZeXtras Reseller
    Participant

    Join Date
    Nov 2012
    Posts
    47

    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
    Member ZeXtras Reseller
    Participant

    Join Date
    Nov 2012
    Posts
    47
    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".

  3. #3
    Member ZeXtras Reseller
    Participant

    Join Date
    Nov 2012
    Posts
    47
    Got a reply from the Zimbra forums (http://www.zimbra.com/forums/adminis...-s-backup.html). Posting here for archival purposes:

    The below now works to get the "Emailed Contacts" addressbook.
    Code:
    /opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL '/?fmt=csv&query=under:"Emailed Contacts"'
    And to get a list of all addressbooks:

    Code:
    zmmailbox -z -m user gaf
    And play with folder type "cont" and then extract required info.

    Hope this helps someone else as well

  4. #4
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,363
    Thread moved to the "Zimbra HowTo" section, as it does not concern any ZeXtras product.

    Have a nice day,
    Cine

Bookmarks

Posting Permissions

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