<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<div class="moz-cite-prefix">On 10/18/2022 7:46 PM, Steve Litt
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0ff57f708eec20e7c599eb1984c35ea95dbc61eb.camel@troubleshooters.com">
<pre class="moz-quote-pre" wrap="">On Tue, 2022-10-18 at 16:48 +0200, Bernardo Reino wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On 18/10/2022 12:17, Michael wrote:
>
> [...]
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
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
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Do you think the preceding shellscript will work if I store my Dovecot messages in
the Maildir form?
Thanks,
SteveT
</pre>
</blockquote>
<br>
<font size="2">Yes it will. The source format is your current format
(maildir) and the target format is whatever you specify (mdbox:
or maildir:) <br>
<br>
I do something similar with my daily backups using dsync. Like
others, I was hesitant about using mdbox in the beginning and my
solution was to create my point in time backups in maildir format.<br>
</font>
<blockquote><font face="monospace">for user in $users; do</font><br>
<font face="monospace"> dsync -u ${user} backup
maildir:/home/$user/.mailbkup/mailboxes</font><br>
<font face="monospace">done</font><br>
</blockquote>
<font size="2"><br>
This is a simplified version of my command. In my backup script
this runs inside another loop to make backups for all users in
parallel, but I only have about 20 users and plenty of excess CPU
on my server. </font><font size="2"><font size="2">I run this
about 4 times per day to sync changes to my backup copy. Once
the initial sync is done the incremental changes run pretty
quickly.<br>
</font><br>
Doug<br>
</font>
</body>
</html>