Need help recouperating Kopano!

I upgraded my servers from 4.4-9 to 5.0-2 this weekend, and it went horribly wrong! The Primary Directory Node did not want to work anymore, could not log into the console, ldap seemed to be completely wiped out. I managed to sqldump my kopano database and save my attachments folder as per the disaster recovery option I found on the kopano wiki page. After many hours trying to get everything to work, I decided to reinstall everything from scratch. Now I’m trying to import my old kopano database into the new setup, but the users’ old messages are not shown in the webapp! Can someone shed some light on the problem? Can I import the old mailboxes or is it a lost cause?
Thanks for any help!

The database and attachments are all you need. My guess is, you find all your data in form of orphaned stores, since you didn’t restore the ldap from a dump, but recreated them manually. In that case the connection between the old users/stores in kopano and the new ones in ldap is lost and the users have fresh, empty stores attached. You can reattach the previous, now orphaned, stores using kopano-storeadm/kopano-admin.

I looked over as much of the documentation I could get my hands on (man pages + github). I think I have a good understanding of what needs to be done. I do have a few questions, if you don’t mind.

#1. While I was waiting for your first response, I decided to reinstall Kopano on a new server, so my users could start receiving some mail. Therefore, before attempting the procedure, I should use kopano-backup to save their current mailboxes, so I can import them back into their old stores?

#2. According to the documentation I found, I need to drop the current database and create a new blank one. A> Do I need to make sure the Kopano services are stopped? B> Can I use the kopanoDbUser account in mariabd to create the new database, because I can’t seem to connect using the root@localhost account “Access is denied”

#3. Once the procedure is completed, I should log into each user’s account to make sure everything is there, before using kopano-backup to restore the “new” mail?

#4. As for the attachment folder, what are the required file permissions?

Thank you again for helping out. It is much appreciated.

Yes, otherwise you lose the data in them.

Or you can restore the old database on a second server (without disturbing your users) and using kopano-backup to transfer the old data to the new/current mailboxes.

A> The kopano-server process must not be running during the restore.

B> You shouldn’t need to do that, since a default mysqldump contains the required drop table statements.

The kopanoDbUser account is sufficient, but if you want root access, the password for root@localhost can be found in /etc/mysql.secret.

Read/write for kopano-server, no access for others. In a default installation, kopano runs as user kopano, so the attachment directory and all it’s contents should be owned by kopano:kopano.

Thank you. I will be attempting it tonight…

Thank you to the unknown person at Bytemine. The restoration completed successfully. All my old mailboxes are back for all my users!

Good to hear all worked out well.

Mastodon