Benutzer-Werkzeuge

Webseiten-Werkzeuge


it:anwendungen:scalix-mailserver-backup

Scalix Mail Server Backup

This article covers different ways of backing up a Scalix server. As all approaches have pros and cons, it seems that the best strategy to backup a Scalix server is to combine frequent full backups of the entire server (method 1.1) to prevent a disaster with the usage of the Scalix Recovery Folder (method 3.1) to enable simple single mail restoration.

METHOD 1 : BACKUP/RESTORE ALL YOUR SCALIX SERVER

  • Backup

It is highly recommended that you backup your entire Scalix server (including all data and parameters) regularly. This can be performed from the following ways:

  • Method 1.1

Use the sxbackup scripts provided by Scalix and documented in the „Running Backup and Recovery“ of the Scalix Administration Guide.

  • Method 1.2

Use rsync to synchronize your Scalix home directory to another directory on the local file system or to another host on the network.

  • Method 1.3

Use Jone's script for those who are reluctant to use LVM snapshots.
All those methods will create an output that can easily be backed up with Arkeia. All you have to do is to include the output file to an Arkeia savepack. Please notice that this will require to have twice the storage capacity of your Scalix server data available on your hard drive. If you don't have enough storage available, you can run the backup script as an „object commands“ in your Arkeia savepack's tree so that the output will be directly sent to the backup server without being stored to disk.

  • Restore

Restore all the backed up data to the original Scalix home location using the common Arkeia restoration process.
METHOD 2 : BACKUP/RESTORE INDIVIDUAL MAILBOXES

  • Backup

For backing up individual mailboxes, use the sxmboxexp command as follow:

sxmboxexp -u username -a /output_directory/output_filename.mbox -F

Performing the backup of all the user mailbox can be done combining the backup command above and the omshowu command which will list all the user of the Scalix system as in the following script:

 
#! /bin/bash 
################################################ 
# mboxbackup: a backup script for scalix mailboxes 
# 
#  This script is used to backup Scalix mailboxes; it exports each 
#  user mailbox to a dedicated file. 
# 
#  All mailboxes are exported to the same directory so that you'll just have 
#  to backup that directory to backup all the users mailboxes. 
# 
#  Depending on how would like to store the exported mailboxes you should 
#  set the value of the variable BOXDIR prior to use this script. 
# 
#  The command intended to be used as a command before a backup using 
#  Arkeia is : mboxbackup backup 
# 
#  The command intended to be used as a command after a backup using 
#  Arkeia is : mboxbackup clean 
# 
#  Copyright (C) 2006 Arkeia Software 
# 
# This program is free software; you can redistribute it and/or modify 
# it under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 2 of the License, or 
# (at your option) any later version. 
# 
# This program is distributed in the hope that it will be useful, 
# but WITHOUT ANY WARRANTY; without even the implied warranty of 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
# GNU General Public License for more details. 
# 
# You should have received a copy of the GNU General Public License 
# along with this program; if not, write to the Free Software 
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA 
################################################ 
# Set this variable to the directory in which you want to store your mailboxes 
# exported files 
BOXDIR="/opt/arkeia/mboxes"  
# The backup function export each mailbox using the user name as an output 
# file name and adding the .mbox extension 
backup() { 
mkdir ${BOXDIR} && cd ${BOXDIR} 
for i in $(omshowu -m all | cut -d "/" -f 1  | sed -e 's: $::g' -e 's/ /\//g') ; do 
user=`printf "$i" | sed -e 's:/: :g'` 
sxmboxexp -u "$user" -a "$user".mbox -F 
done 
} 
# This function empty the directory used to store the mailboxes 
clean() { 
cd 
rm -fr ${BOXDIR} 
} 
case "$1" in 
'backup') 
backup 
;; 
'clean') 
clean 
;; 
*) 
echo "usage : $0 backup|clean" 
esac 


IMPORTANT NOTE: this backup method requires twice the storage capacity of the user mailboxes to store the outputs on the local file system. If you want to avoid this constraint, you'll have to write a script building an Arkeia „object command“ for each mailbox backup flow because if you set up the script above as an „object command“ you won't be able to recover individual mailboxes from the global backup flow.

  • Restore

For restoring individual mailbox, use the sxmboxexp command as below: Code:

sxmboximp -u username -a /input_directory/input_filename.mbox


METHOD 3: HOW TO BACKUP/RESTORE A SINGLE MAIL

  • Method 3.1
  • Backup:

- Use the Scalix Recovery Folder which enables to restore a single mail previously deleted.
Scalix recovery folder retention date is setted up to seven days per default but you can increase the retention date system wide or for particular users.

  • Restore

To make a Recovery Folder visible to the user, run the following command with the recovery option.

ommodu -o <username> --recovery Y

When the user has finished recovering the item, change the visibility setting back by running the following command.

ommodu -o <username> --recovery N
 *Method 3.2:
 *Backup:


Backup the individual mailboxes using the method 2.

  • Restore

Create a dedicated restore account on the scalix server. Restore all the mailbox of the user to the restore account. login to the restore account using any scalix compliant mail client, locate the requested e-mail and forward it to the user who requested restoration.

  • Method 3.3:
  • Backup:

Backup the individual mailboxes using the method 2.

  • Restore

Restore all the mailbox of the user to a temporary directory. list the content of an archive.

sxmboxlist -a /portages/pb.mbox --listlevel msg

Restore the requested message from the archive.

sxmboximp -u username -a /input_directory/input_filename.mbox -m message_id

Quelle: http://wiki.arkeia.com/mediawiki/index.php/Scalix_Mail_Server

Indem Sie auf "Akzeptieren" im Cookie-Banner auf der Website klicken, stimmen Sie der Verwendung von Cookies, einschließlich ähnlicher Technologien (wie Fingerprinting) sowie Website-Analyse-Tools (im Folgenden „Cookies“) im Einklang mit dieser Cookie-Richtlinie zu. Diese Wahl gilt dann bis zu Ihrem Widerruf (bspw. durch Löschen von Cookies) für diese Webseite und auch für andere Webpräsenzen der Marke dieser Webseite. Sind Sie nicht damit einverstanden, dass wir Cookies auf diese Weise verwenden, sollten Sie entsprechende Einstellungen an Ihrem Browser vornehmen. Die Cookies und Analysedaten werden gelöscht, wenn Sie im Cookie-Banner auf der Website auf "Ablehnen" klicken oder die Schaltfläche am Ende dieser Cookie-Richtlinie auf "Alle Unilever-Cookies ablehnen" setzen. Wenn Sie die Cookies, die wir verwenden, deaktivieren, kann dies Ihre Nutzungsmöglichkeiten auf den Unilever-Webseiten beeinträchtigen. Bestimmte Funktionalitäten auf der Website (z.B. Videos oder Online Buying) können Sie nur nutzen, wenn Cookies akzeptiert werden. Weitere Information
it/anwendungen/scalix-mailserver-backup.txt · Zuletzt geändert: 2019/05/14 21:16 (Externe Bearbeitung)