Gentoo - SysAdmin - Upgrade 20060829 to 2.1
From Kolab Wiki
Upgrading Kolab2/Gentoo-200060829 to Kolab2/Gentoo-2.1
Make sure that you did backup all relevant data from your server. These are the informations that are necessary to reconstruct your server:
- Backup your /var/spool/imap directory. It contains all you mail.
- Backup your /var/imap directory. It contains all cyrus information (e.g. the available mailboxes, the mailbox annotations and so on)
- Save your LDAP database in LDIF format by running
slapcat -l ldap_db_backup.ldif
You might also wish to save the following data:
- The templates in /etc/kolab/templates in case you modified any of them
- The spamassassin bayes database if you trained spamassassin to recognize spam. In order to save it run
sa-learn --backup > spam_db.txt
- The data of mysql if you installed and use mysql. Run the following to save the data
mysqldump -u ROOTUSER -p ROOTPASS --all-databases > mysql_db.sql
Stop the apache2, postfix, cyrus, and kolabd service. Do not stop the slapd server!
Now unmerge a number of packages
emerge --unmerge cyrus-imapd cyrus-imap-admin \ postfix dev-php/horde \ perl-kolab kolab-resource-handlers \ kolab-webadmin kolabd
At this point you should clean up your template directory and remove any old otrs templates if you had that package installed:
If you did not modify the Kolab templates at all you can also remove all the templates in that directory just to be on the safe side that no old templates were left over:
Now emerge kolabd by running
It will probably fail twice.
Fix the apache installation
The first time it will complain about the module mod_authn_alias not being activated for apache.
This can be fixed by adding the line
in the file /etc/apache2/apache2-builtin-mods. Afterwards you need to re-emerge apache to get this module built:
Now that apache is complete you should make sure that you have no old, leftover configuration files in the /etc/apache2 directory:
rm /etc/apache2/modules.d/55_mod_auth_ldap.conf rm /etc/apache2/vhosts.d/10_kolab* rm /etc/apache2/vhosts.d/kolab-*-horde.include*
Fix your cyrus databases
The second time kolabd should fail to emerge because of the old format of /var/imap/mailboxes.db and /var/imap/annotations.db. The ebuild provides the necessary instructions to convert the databases.
Reconfigure your system
Now reconfigure your system by running
You should restart all services belonging to Kolab afterwards. They'll hopefully start all without problems.