How to backup and restore your Zarafa mysql database?
Published by jacob355 on June 12, 2015
Zarafa is an application at that offers email storage and collaboration on server side, it is having its own mail clients WebAccess and Webapp. By using the SOAP technology zarafa server communicates with the client side, and with the help of client side plug-in it gets integrated with Outlook email client that makes it popular alternative for Exchange. This connection of Outlook and Zarafa server are done in safe and secure way by using TLS/SSL or an HTTPS proxy.
Zarafa saves all its data in a MySQL database which is widely used by re4lational database system (RDMS).Ibdata files are MySQL database that stores the metadata of InnoDB tables, re-write buffer, change buffer, and undo logs. The .frm files stores the definitions of the database tables and related information. If this .From file data gets corrupted because of any reason then the data saved on Zarafa server completely turns inaccessible. So for such situation it is very much important to keep a backup copy of your data, but have you ever though what will you do, if this case happen with you. And for that you should learn how you can backup and restore your Zarafa mysql database data from ,so if such corruption issue encounter in your zarafa database then also you need not to worry about your data.
Scenario
For this it is very compulsory that you must have the following:
- You also got backup of your database folder with .frm files
- You got backup of your ibdata1, ib_logfile0 and ib_logfile1
- You would like to restore this backup into an MySQL server that’s already in production.
Suppose you have just stored your attachments outside of the mysql database and want to backup and restore your Zarafa mysql database.
Restore the data backup you got
For this, follow the following steps:
- To make a full backup of the Zarafa MySQL database, the easiest way is to make full back is via the default mysqldump command.
At the time when you are using this command, it’s important that you do not lock the tables. - When the attachments get saved outside the database, a full mysqldump is not enough. In order to backup the attachments on the filesystem you can use the opensource rsync tool.
- Stop zarafa and smtp (postfix) services
- Make a mysql backup (e.g. mysqldump –single-transaction -u -p > backup.sql)
- Stop mysql server and backup your ibdata and ib_logfiles from the /var/lib/mysql folder
- Make a cross check for your mysql backup to make sure that you have a proper backup
- Start mysql server and drop the zarafa database
- Stop mysql server and remove the ibdata1 and ib_logfiles (assuming you backed them up in the previous steps!)
As second option – Tune MySQL
- Copy your my.cnf configuration file to a safe place
- Follow MySQL_tuning
- Start mysql server and create the zarafa database
- Restore your backup (e.g. mysql -u -p < backup.sql)
- Wait till it gets over (can take very long with huge databases!)
- Start zarafa and smtp (postfix) services
- Check if everything is working!
Restore you data
After getting the backup, now you can copy your SQL dump to your production server and simply restore the data from your MySQL dump file like this:
mysql -u root -p database < database.sql
If, in case the above manual method won’t work to restore your data back from the corrupted zarafa database then you can opt for the fast and easy method to sort this issue by using a third party tool that is ZCP File repair tool as it is the most powerful tool that scans your damaged (.frm) file and effectively restores its valuable mailbox items like appointments, emails, tasks, contacts, notes, distributions lists, calendars attachments etc.
Steps to backup and restore your Zarafa mysql database
Step 1: Firstly, download, install and then open Zarafa repair tool.
Step 2: Select the file you want to repair and the tool will automatically connect MySQL server and an interface shown below will appear.
Step 3: Wait for some time and you will see a dialogue box with “User login information”, fill it up and press OK.
Step 4: The repair process will start soon and you will get messages in succession that shows progress in recovery.
Step 5: After completion of the process, follow the message displayed on screen.
By going through the above article you will be able to Recover emails from Linux based server. The steps shown are very easy and can be performed by any non technical person.
916 Total Views 2 Views Today