MBF Knowledge Base

How to copy a calendar from one Zimbra user to another

Example:

We will export a calendar called "MBF calendar" from one user to another user and name it "MBF" in the destination account.

Step 1:

Export the calendar "MBF calendar" from user SRC_USER:

[root@zimbra ~]# curl -u admin 'https://zimbra:7071/home/SRC_USER/MBF%20calendar?fmt=ics' > MBF.ics


Step 2:

Adjust all the meeting organizer addresses. If you don't do this, the destination user will see the
appointments, but can not edit them.

[root@zimbra ~]# cat MBF.ics | sed 's/SRC_USER@/DST_USER@/g' > MBF-dest.ics

Step 3:

Create an empty calendar in destination user account.

[root@zimbra ~]# su - zimbra -c 'zmmailbox -z -m DST_USER createFolder --view appointment /MBF'

Step 4:   

Import modified ical data into new calendar.

[root@zebra ~]# curl -u "admin" --data-binary @MBF-dest.ics 'https://zimbra:7071/home/DST_USER/MBF?fmt=ics'