Backup methods

Niels Dettenbach nd at syndicat.com
Wed May 9 05:42:35 EDT 2018


Am Mittwoch, 9. Mai 2018, 11:19:54 CEST schrieb Albert Shih:
> I would like to know what's kind of backup method are recommended for
> cyrus-imapd.
> 
> My cyrus-imapd host (only one currently) are running under FreeBSD jail
> (something like systemd-nspawn, lxc) & ZFS so I'm intend to use this
> method :
> 
>   stop the vm
>   take a zfs snapshot
>   start the vm
> 
> send the zfs snapshot on a backup server.

This is relatively inefficient, but a working option if anything from cyrus 
data is on that VM - i.e. the complete mail spool and the database files 
(possibly plus sieve files). We do similiar on relatively small systems or to 
get "intraday backups" only.

On larger systems with VMs i take a ZFS or LVM snapshot and mount it 
externally to "fetch" a full (incremental) filesystem backup of the mail spool 
and imap spool and cyrus db on a daily base. After the backup run i destroy 
the snapshot.

Beside this and depending from your needs you may take a look at cyrus 
replication features to build a "backup" or just use standard filesystem 
backup tools like tar, dumpfs etc.

On a file base you have to backup the mail spool and the cyrus database files. 
If you use SIEVE, backup the SIEVE file pool too. You can restore by just 
replacing the files and start cyrus. To get the common database files 
"interoperable" it may makes sense to dump then into a machine independent 
format for backup if they are in a machine dependent format.

If your restore such a filesystem based backup to a new system which has other 
hardware / arch specs or newer / incompatible DB subsystem (instead of 
skiplist) you may have to "recreate" indizes and database data. reconstruct -
f may be your friend to "clean" up the transfer / restore.

There are several strategies for backup cyrus - this are just a few.


hth a bit.
good luck,


Niels.

-- 
 ---
 Niels Dettenbach
 Syndicat IT & Internet
 http://www.syndicat.com
 PGP: https://syndicat.com/pub_key.asc
 ---
 








More information about the Info-cyrus mailing list