msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

02 Aug 2012 Backup of Zimbra MailBox using zmmailbox

This is a short script I use to backup the Zimbra mailbox content for my users.
This has been used on a Zimbra Collaboration Server (ZCS Open Source Edition) 7.2 installation, but should work on earlier versions as well.
I use another script to backup the whole Zimbra installation, but that might be another blog post.


#!/bin/bash -x
# Backup of Zimbra mailboxes using zmmailbox
# Restore of mailbox should be performed using:
# /opt/zimbra/bin/zmmailbox -z -m user@host postRestURL -u https://HOST "//?fmt=tgz&resolve=skip" mailbox-name-date.tgz
BackupFolder="/backup/zimbra"
MailBox="user1 user2 user3 userN"
DateToday=`date -I`
for name in $MailBox
do
sudo -u zimbra /opt/zimbra/bin/zmmailbox -z -m $name@pario.no getRestURL "//?fmt=tgz" > mailbox-$name-$DateToday.tgz
done

The backup files are named mailbox-user1-20120802.tgz mailbox-user2-20120802.tgz …

Tags: , , , , , ,

Posted by

24 Jan 2008 Share calendar between Zimbra users

This post describes how to create shared calendars between two users in Zimbra 5.0

In this example, the administrator designates a mount point to userA@example.com for the calendar to  userB@example.com account for which he will have read/write permissions.

As user zimbra do the following

zmmailbox
mbox> adminAuthenticate -u https://server.example.com:7071 admin@example.com password
mbox> selectMailbox userB@example.com
mailbox: userB@example.com, size: 1.44 GB, messages: 20868, unread: 2564

getAllFolders        Id  View      Unread   Msg Count  Path
----------  ----  ----------  ----------  ----------
         1  conv           0           0  /
        10  appo           0           0  /Calendar
        14  mess           0           0  /Chats
         7  cont           0           0  /Contacts
       720  mess           0           0  /Deleted Messages
         6  mess           0           0  /Drafts
         2  mess          11        1010  /Inbox
       901  conv           0           0  /Journal
         4  mess           0           0  /Junk
       900  conv           0           0  /Outbox
         5  mess           0           0  /Sent
        15  task           0           0  /Tasks
         3  conv           0           0  /Trash
mbox userB@example.com>getFolderGrant /Calendar

Permissions    Type  Display
-----------  ------  -------
      false        rwidx  accoun  null
mbox userB@example.com>modifyFolderGrant /Calendar account userA@example.com rw
mbox userB@example.com>gfg /Calendar
Inherit  Permissions    Type  Display
-------  -----------  ------  -------
  false        rwidx  accoun  null
  false           rw  accoun  userA@example.com
mbox userB@example.com>selectMailbox userA@example.com
mailbox: userA@example.com, size: 1.12 GB, messages: 5400, unread: 860
mbox userB@example.com>createMountpoint --view appointment /userB-calendar userB@example.com /Calendar

userA@example.com should now see the calendar to userB@example.com as userB-calendar in the Calendar view.

Tags: , , , , , , , ,

Posted by