SEP sesam Extension for Zarafa

From SEPsesam

SEP sesam Extension for Zarafa

SEP provides a free backup solution for small Zarafa environments

(C)SEP AG

Copyright 1999-2008 by SEP AG. All Rights reserved.

Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.


Contents

Introduction

The SEP sesam online module for Zarafa makes hot backups of Zarafa GroupwareServers possible. This includes saving and restoring single user mails, mailboxes and public folders.

System requirements

SEP sesam / Zarafa version

  • Running SEP sesam server version >= 3.4.1.31
  • Zarafa Server >=5.20 or greater on Linux - Zarafa Community Edition is not supported
  • SEP sesam client >= 3.4.1.31
  • Working path backup of the Zarafa server

Zarafa Community Edition

The Zarafa Community Edition does not include the Brick Level Backup API from Zarafa.Therefore the SEP sesam Zarafa Extension does not support the Zarafa Community Edition.

See: http://www.zarafa.com/content/editions

Of course, you can use SEP sesam to perform a filesystem backup of your Zarafa system.

Installation

Install the SEP sesam client package for Linux on the Zarafa Server by downloadin the Zarafa extension (SEP sesam Extension for Zarafa) and copying the file libsbczarafa.so into the Sesam binary directory (mostly /opt/sesam/bin/sesam.

Note

If you are using the SEP Sesam Client Versions 3.6 you dont have to manually install the extension. It is already includedin the Client Package

Backup Configuration

The rest of the configuration can be accomplished using the SEP sesam GUI.

Configuration of mailbox backup

Attention

Currently only backups with the backup type "Full" are possible!

  • Create a new backup task for the Zarafa server
  • Choose Zarafa as task type
  • Important! The size of the backup directory must have at least the volume of the largest mailbox
  • Enter backup source in the following format:
ALL
All users and public folders

Image:zarafa_all.jpg

ALL_USERS
All users

Image:zarafa_all_users.jpg

PUBLIC_FOLDER
All public folders

Image:zarafa_public.jpg

<User1>, <User2>, ...
One or more user mailboxes

Image:zarafa_single_user.jpg

A Finally setup Task for certain users should look like:

Image:zarafa_fin.jpg


Exclude list:

The Exclude list can be used to omit certain mailboxes from the backup. Exclude patterns are regular expressions which are compared against username.

Example:

^support$

will exclude just the user support and

support

will exclude users like support, sepsupport and support1.

This screenshot shows a Backup Task that saves all users but "mk" and "shettler":

Image:zarafa_exclude.jpg

Note

Browsing for the backup source is possible with SEP sesam client version 3.4.1.30 (and up).

Restore Configuration

Single mail restore

During the restore you can select single mails in the SEP sesam GUI. The only function you can select in the last register of the restore wizard is Auto recover after restore.If selected, SEP sesam will import the mail into the original mailbox. Otherwise the exported mail data and index files are restored into the filesystem to <SESAMVAR>/work/zarafa and can be imported manually with the command zarafa-restore.

Attention

Please leave all other fields unchanged!

The following example shows a restore of a single mail into the original mailfolder. SEP Sesam will import it automatically with the "Auto Recover and online after restore" option:

Image:zarafa_restore_1.jpgImage:zarafa_restore_2.jpgImage:zarafa_restore_3.jpgImage:zarafa_restore_4.jpg

Troubleshooting

General information about the backup process

SEP Sesam uses the Zarafa Bricklevel Backup API in order to back up the user's mailboxes.This means the SEP Sesam client first receives a list of available users on the Zarafa system and then goes ahead and exports the mailboxes that are to be backed up by usingthe Zarafa tool "zarafa-backup".

The mailbox is exported to the <SESAM_ROOT>/var/work directory by default.Please ensure that the partition that is holding your work directory can hold as much spaceas the biggest mailbox in your Zarafa environment.

If the export of a certain mailbox fails for whatever reason (not enough disk space,internal Zarafa errors), it is always a good idea to look at the SEP sesam backup protocol.

The backup protocol

The Sesam backup protocol contains a detailed logging of what happened during theZarafa backup. It also contains each call of the Zarafa Bricklevel Backup API.

This example shows a part of a Zarafa backup loggin with a successfull call of theZarafa Bricklevel tool:

[..]2009-11-06 10:15:43: sbc-3103: Info:     DB Module: [Start export: [zarafa-backup -u ryan]]Fr 06 Nov 2009 10:15:43 CET: Creating folder and message list for user ryanFr 06 Nov 2009 10:15:51 CET: Starting full backup for user ryanFr 06 Nov 2009 10:16:16 CET: processed 264 of 264 messages in folder 'Inbox'Fr 06 Nov 2009 10:16:16 CET: processed 8 of 8 messages in folder 'Sent Items'Fr 06 Nov 2009 10:16:16 CET: processed 2 of 2 messages in folder 'Contacts'Fr 06 Nov 2009 10:16:16 CET: processed 8 of 8 messages in folder 'Calendar'Fr 06 Nov 2009 10:16:16 CET: Done backup for user ryan[..]

After exporting the mailbox SEP Sesam continues with backing up the exported files.

If the export fails for some reason the error is reported in the SEP Sesamlogfile. This example shows a backup for a user that doesn't exist:

2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [Warning: User "userdoesnotexist" was not found on the server]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [BuildFinalUserList(-)]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [ProcessExcludeList(+)]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [ProcessExcludeList(-)]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [Found [0] mailboxes in mailnode]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [DB_InitOperation (-)]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [DB_GetItem(+)]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [DB_GetItem(): There are no users to backup]2009-11-06 15:36:36: sbc-3103: Info:     DB Module: [DB_GetItem(-), reason=DB_NUM_I_COMPLETE]2009-11-06 15:36:36: sbc-1120: Error:    Backup source could not be found. Exiting.

Testing the backup on the Zarafa server locally

In some cases it may be important to get a first impression of how long thebackup takes. This can be done by backing up the Zarafa mailboxes directly on the Zarafa server itself without writing to some media. This is alsoa nice way to check if your firewall closes ports due to small timeouts.

This can be done by using the SEP Sesam backup client on the command line.

The following command executes a backup of all Zarafa mailboxes and writesits data to /dev/null :

root@zarafa_host#: /opt/sesam/bin/sesam/sbc -b -s - "ZARAFA:all" > /dev/null

Of course it's also possible to only back up certain users on the commandline ("cl" is the username in this case):

root@zarafa_host#: /opt/sesam/bin/sesam/sbc -b -s - "ZARAFA:cl" > /dev/null

Testing the zarafa Bricklevel export with Zarafa tools

In some cases it makes sense to test the export of mailboxes by using only Zarafatools. Mailboxes can be exported with the command "zarafa-backup".This example shows the export of the user "test" into the current directory:

root@zarafa_host#: zarafa-backup -u test -o .

After the export the directory should contain two files:

test.index.zbktest.data.zbk

The file "index.zbk" contains an indexed listing of the mail ID's that were in the mailbox. "data.zbk" holds the real data.

If this export fails with the Zarafa Bricklevel tools, please get in touch withyour Zarafa support technician.

Special configuration settings for connection timeouts / firewalls

In any case the SEP Sesam Client opens a control connection to the SEP Sesamserver. This control connection stays open during the whole backup process butdoes not transfer data. If there is no communication between the client andthe Sesam server this connection may get dropped by some firewalls because oftimeout values. Please make sure to set the timeout settings in your firewall toan adequate value.

Also the export of big mailboxes by the Zarafa Bricklevel tools can takesome time. If you encounter logmessages like "XBSA Errors" and"Connection timouts" it is always a good idea to check your firewallloggings.

SMS timout value (SERVER SIDE) for big mailboxes

If you have big mailboxes and the export takes a long time we recommendto also increase the DATA_TIMEOUT setting for the STPD data transfers.

The following configuration variable in <SESAM_ROOT>/var/ini/stpd.inican be set to a timeframe in seconds. The default value is "7200". If yourbiggest mailbox takes more than 2 hours to export this may become aproblem.

[STPD_Thread]STPD_BUFSIZE=4DATA_TIMEOUT=7200AUTH_USERS=smsUPDATE_THROUGHPUT=30STPD_ACCEPT=TRUE

SBC timeout value (CLIENT SIDE) for big mailboxes

On the client add the following configuration statement to <SESAM_ROOT>/var/ini/sm.ini

[Params]SBC_GEN_TIMEOUT=10800

This increases the timeout the Sesam backup client waitsfor data to be transfered to 3 hours.

Further Links/Literature