How To Export/Import Quota on Zimbra Mail Server

Posted by

Quota is one of many attribute that should be migrated while doing migrating from old to the new Zimbra. First, you should export value of quota on the old Zimbra and second, you should import the result of export to the new Zimbra. The following is what i do for export/import quota from old to the new Zimbra.

On the old Zimbra Mail Server

# Create simple script for retrieve information of quota

chmod 775 /srv/
chgrp zimbra /srv/
vi /srv/

Fill with the following line

rm /srv/modify-quota.zmp
touch /srv/modify-quota.zmp

echo "Process Export Quota"
zmprov -l gaa | while read ACCOUNT
QUOTA_TOTAL=`zmprov ga ${ACCOUNT} | grep "zimbraMailQuota" | cut -d ":" -f2`
echo "ma ${ACCOUNT} zimbraMailQuota${QUOTA_TOTAL}"
done >> /srv/modify-quota.zmp

# Save and execute the script

chmod +x /srv/
su - zimbra
sh /srv/

The results of above script is file with name modify-quota.zmp that saved in folder /srv/. Copy the file to the new Zimbra mail server

On the new Zimbra Mail Server

Assuming the file modify-quota.zmp is placed in /srv/ folder. Run the following command as Zimbra user

su - zimbra
zmprov < /srv/modify-quota.zmp

Please check one of accounts whether value of quota has been changed or not. If you having trouble, please feel free to contact me on the comment form 😀

Good luck and hopefully useful 😀

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.