Hello Robert,
----- Nachricht von Robert Moskowitz via dovecot dovecot@dovecot.org
Datum: Sat, 9 Feb 2019 22:50:24 -0500
Von: Robert Moskowitz via dovecot <dovecot@dovecot.org>
Antwort an: Robert Moskowitz rgm@htt-consult.com, Dovecot Mailing
List dovecot@dovecot.org
Betreff: How to backup maildir
An: Dovecot Mailing List dovecot@dovecot.org
I have been thinking, and reading, on how to back up my mailserver.
I have not found any approach that seems ready to use.I have run years without any backup, but would really like to have
something in place.
you're a really lucky guy! - I've been struck in the past for such
carelessness on the one or other machine with dataloss ;-)
I figure I can attach a USB drive and backup to that, then from
there rsync to something elsewhere. Further if that USB drive is a
full mailserver image, I actually have a 'hot backup' where I only
have to put the backup drive into a system and boot up at the last
backup.But this means properly copying all of /home/vmail and probably
/home/sieve plus the /var/lib/mysql
Are you aware of the dovecot command "dsync"? (man dsync or
https://wiki.dovecot.org/Tools/Doveadm/Sync)
This could be an approach of using dsync:
dsync backup -o plugin/quota= -f -u $user backup
maildir:/mnt/USB/dovecot-backup/Maildir/$user/mail
Are there good tools that nicely does this? Or do I choose a time
late at night (only I am sometimes in non-US timezones) to shut down
all services and just use rsync?And stopping services itself is thought provoking. What if Dovecot,
amavis, mysql, or whatelse is in the middle of writing out a mail
file what happens to that file and restart.Just scary stuff and, in part, why I have never tackled this in the past.
thanks for all feedback
----- Ende der Nachricht von Robert Moskowitz via dovecot
dovecot@dovecot.org -----
It really depends on how important your data is to you ... But you
should really think about a general backup-strategy!
"Mr. Google" can help you to get some ideas how YOUR backup-strategy
could look like...
Also there is much input for backing up dovecot with it's different
mail storage flavours.
- But you have to invest some effort on your own, to search, read,
evaluate and finally choose what's fitting into YOUR setup!
But as an starting point:
I'm using a for _MY setup_ modified and adopted version of Klaus
Tachtler's dovecot-backup script:
https://github.com/tachtler/dovecot-backup/blob/master/dovecot_backup.sh
... mixed it with Borg Backup: https://www.borgbackup.org/
... some further encryption, cloud storage and ... and ... and other stuff.
But as above mentioned:
YOU have to think about the grade of your paranoia level, how
importand the data is to you in case of an data loss, time and money
you are willing to invest and build upon this YOUR PERSONAL backup
strategy.
- Sadly there is no one-size-fits-all!
Last famous words:
I've looked at your vita and was wondering about your post - you were
writing RFCs, but have no clue about backing up your mail-data???
Strange ...
Nevermind! Just my 2ct - hope this helps Christoph.
-- Christoph Haas