[Dovecot] mdbox + gzip and rsync
Timo Sirainen
tss at iki.fi
Mon Mar 12 17:46:51 EET 2012
On 12.3.2012, at 17.10, Micah Anderson wrote:
> Jean-Daniel Beaubien <jd.beaubien at gmail.com> writes:
>
>> After reading the following paragraph from the dovecot doc, I've been
>> wondering how it would affect rsync (when combined with gzip):
>>
>> "Expunging a message only decreases the message's refcount. The space is
>> later freed in "purge" step. This is typically done in a nightly cronjob
>> when there's less disk I/O activity. The purging first finds all files that
>> have refcount=0 mails. Then it goes through each file and copies the
>> refcount>0 mails to other mdbox files (to the same files as where newly
>> saved messages would also go), updates the map index and finally deletes
>> the original file. So there is never any overwriting or file truncation."
>
> Interesting, so it would be recommended to those using mdbox format to
> run a 'dovadm purge -A' every night to clean up these unused files? It
> seems like without this, mail storage usage will just grow infinitely.
Yes.
> It does appear that using an rsync backup process for mdbox would not be
> able to detect this and backups would also grow infinitely.
rsync --delete would delete the old files, right? Anyway, I'd avoid using rsync for mdbox unless you're doing it on a filesystem snapshot. dsync backup should work better.
More information about the dovecot
mailing list