Backups in Openexchange Server 4
Support knowledgebase (rsimai_slox4_backup)
Applies to
Openexchange Server: Version 4
Concern
How to make backups in Openexchange Server 4.
Backups can be made with special backup programs or with the tools included in Openexchange Server 4.
This article describes the procedure with tar
, which can be transformed into a script.
Attention: This is a list of directories required for a full backup on a standard system. The data can be
restored e.g. following a new system installation. However, although we did our best to include all relevant
directories, we cannot provide any guarantee. For this reason, you should always rehearse a disaster scenario
on a non-productive system!
Procedure
- Stop the following services:
- rcldap stop
- rcfetchd stop
- rcpostfix stop
- rccyrus stop
- rcgroupware stop
- rcwebmail stop
- rcpostgresql stop
- Make a backup of the following files:
First create an explicit name for the backup file, e.g.:
BACKUPFILE="backup-$(date +%Y%m%d%H%M%S).tar"
- tar cvf $BACKUPFILE /etc/
- tar rvf $BACKUPFILE /var/lib/imap/
- tar rvf $BACKUPFILE /var/spool/imap
- tar rvf $BACKUPFILE /var/spool/postfix/
- tar rvf $BACKUPFILE /var/lib/ldap
- tar rvf $BACKUPFILE /var/lib/pgsql/
- tar rvf $BACKUPFILE /var/lib/sieve/
- tar rvf $BACKUPFILE /var/opt/comfire/filespool/
- tar rvf $BACKUPFILE /var/named/
- tar rvf $BACKUPFILE /home/
If you specify all directories in a single command line,
you can use the additional option 'z' to make tar
compress the archive with gzip
when creating it. Adapt the file name accordingly (.tar.gz oder .tgz). For more information, please refer to the
man page man tar
.
- Start the following services:
- rcpostgresql start
- rcwebmail start
- rcgroupware start
- rccyrus start
- rcpostfix start
- rcldap start
- rcfetchd start
Remember the following when restoring an entire system:
- The archive does not contain absolute paths. Therefore, if no additional parameters are specified, it will be unpacked in the current directory.
- The system to which you restore the data must first be installed anew with exactly the same data (host name, domain, IP, LDAP BaseDN).
- Execute
SuSEconfig
- Log in as cyrus using the web frontend and select 'Hosts/domains' -> 'Virtual domains' -> 'Export'.
Example script
This script can be used as draft for your backup. You may want to extend it to fit your needs.
#!/bin/bash
export PATH=/bin:/sbin:/usr/sbin:/usr/bin/
BACKUPFILE="backup-$(date +%Y%m%d%H%M%S).tar"
rcldap stop
rcfetchd stop
rcpostfix stop
rccyrus stop
rcgroupware stop
rcwebmail stop
rcpostgresql stop
tar cvf $BACKUPFILE /etc/
tar rvf $BACKUPFILE /var/lib/imap/
tar rvf $BACKUPFILE /var/spool/imap
tar rvf $BACKUPFILE /var/spool/postfix/
tar rvf $BACKUPFILE /var/lib/ldap
tar rvf $BACKUPFILE /var/lib/pgsql/
tar rvf $BACKUPFILE /var/lib/sieve/
tar rvf $BACKUPFILE /var/opt/comfire/filespool/
tar rvf $BACKUPFILE /var/named/
tar rvf $BACKUPFILE /home/
rcpostgresql start
rcwebmail start
rcgroupware start
rccyrus start
rcpostfix start
rcldap start
rcfetchd start
See also:
Important Files and Directories in Openexchange Server
Keywords: OPENEXCHANGESERVER, SLOX, BACKUP
Categories:
SuSE Linux IMAP Server
Feedback welcome: Send Mail to srsimai@suse.de (Please give the following subject: SDB-rsimai_slox4_backup
)
SDB-rsimai_slox4_backup, Copyright SuSE Linux AG, Nürnberg, Germany
- Version: 19. Dec 2002
SuSE Linux AG - Last generated: 07. Aug 2003 by afaber (sdb_gen 1.40.0)