On Tue, 2022-10-18 at 16:48 +0200, Bernardo Reino wrote: > On 18/10/2022 12:17, Michael wrote: > > > > [...] > > so, raid is mandatory, which is already the case, but what about backup? > > how can i achieve a backup/snapshot of both, the mdbox (nfs share) and > > the index files (local raid) and assure they are consistent? > > You can use doveadm to backup the mailboxes, which should work correctly > even in a live system. > > My backup "strategy" (hopefully it deserves that name) is to weekly run > something like: > > for MAILBOX in $USERS; do > doveadm expunge -u "$MAILBOX" mailbox Trash savedbefore 7d > doveadm expunge -u "$MAILBOX" mailbox Spam savedbefore 30d > doveadm purge -u "$MAILBOX" > > LOCATION2="mdbox:/srv/snap_mail/$MAILBOX/mdbox" > doveadm -v backup -u "$MAILBOX" -P "$LOCATION2" > done
Do you think the preceding shellscript will work if I store my Dovecot messages in the Maildir form? Thanks, SteveT