Archive for March, 2012

Backing up Zimbra using LVM

March 17th, 2012 1 comment

Now, since we moved to Zimbra I wanted to actually have it backed up.
Small script to do it using LVM:

DATE=`date -u +%d%m%Y`
echo "`date +%k:%M:%S` Backup started."
# Stop zimbra, create a snapshot volume, start zimbra
echo -n "`date +%k:%M:%S` Stopping zimbra... "
/etc/init.d/zimbra stop 2&> /dev/null
echo " done."
echo -n "`date +%k:%M:%S` Creating snapshot volume... "
/usr/sbin/lvcreate -L 5G -s -n vol_zimbrabackup /dev/vg0/vol_zimbrarh 2> /dev/null 1> /dev/null
echo " done."
echo -n "`date +%k:%M:%S` Starting zimbra... "
/etc/init.d/zimbra start 2&> /dev/null
echo " done."
# Mount the snapshot, create a backup tarball, unmount snapshot, remove the volume
echo -n "`date +%k:%M:%S` Mounting snapshot... "
/bin/mount /dev/vg0/vol_zimbrabackup /zimbrabackup 2> /dev/null 1> /dev/null
echo " done."
echo -n "`date +%k:%M:%S` Packing up stuff... "
/bin/tar jcf /var/backup/zimbra-$DATE.tar.bz2 /zimbrabackup/* 2&> /dev/null
echo " done."
echo -n "`date +%k:%M:%S` Un-mounting snapshot... "
/bin/umount /zimbrabackup
echo " done."
echo -n "`date +%k:%M:%S` Removing the snapshot... "
/usr/sbin/lvremove -f /dev/vg0/vol_zimbrabackup 2> /dev/null 1> /dev/null
echo " done."
# Cleanup logs older than a week
echo -n "`date +%k:%M:%S` Cleaning up old stuff... "
/usr/bin/find /var/backup/zimbra*.bz2 -type f -mtime +7 | xargs rm -f 2&> /dev/null
echo " done."
echo "`date +%k:%M:%S` Backup done."

Migrating from Scalix to Zimbra

March 17th, 2012 7 comments

So, this week I again got a feeling that Scalix is not coming back from the dead as a company. After waiting for more than a year for new versions – I gave up.

Search for a new solution ended up on choosing Zimbra Opensource Edition.

Considering that I wasn’t able to find any real guide to migration, I decided to lay down my experiences over here for my own use and for whoever might find this useful.

Read more…