How to backup the mail server?

Hi all,
I’m a novice.

I’m testing Univention Mail Server 4.3, everything works fine, but I need to backup users’ emails. Can someone please help me what files should I backup?

Thank you.

Best regards!
Demol

Hi,

the “Mail Server” is based on Dovecot, you will most likely find information in the Dovecot Wiki or by searching at other generic places. As far as I know there is nothing really specifc for UCS regarding the Backup of the mails. From what I know (disclaimer: not running this configuration atm) any file based backup of the dovecot directory below /var should be sufficient.

hth,
Dirk

Minor correction: the directory containing the mails is /var/spool/dovecot
Why not backup the whole machine? This will cause less hassle when you need to restore it. Any rsync based solution (rsnapshot etc.) should work.

We use Borg Backup for backing up the whole machine, it’s by far the best backup tool I ever used.

2 Likes

Another vote for Borg here. It’s one of the few, if not the only, tool including all the features I’d want:

  • Block-level deduplication (storage overhead is much, much lower than any type of rsync-hard-link-based solutions such as rsnapshot or dirvish, speaking from experience)
  • Supports ACLs and extended attributes (both are essential if you’re using file shares!)
  • Storage format can be any type of file system, including CIFS, NFS, heck even sshfs works (unlike rsync-hard-link-type solutions which require that the target filesystem itself supports file permissions, ACLs and extended attributes — which neither NFS nor CIFS do!)
  • Client-side encryption (= security)
  • Can back up to external hosts via SSH (= more security)
1 Like

Hi
I use imapsync (via cron job) and a smal NAS with a 2nd mailserver, so I can copy verry fast a single mail back.

Thank you all for your recommendations!

I am using an EC2 instance in AWS. The idea that I have is to keep an AMI up to date and back up all the emails of all the users on an EBS every day.

Best regards,
Demo

Mastodon